projects
/
darkstat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
allow sort on "last seen"
[darkstat]
/
hosts_sort.c
diff --git
a/hosts_sort.c
b/hosts_sort.c
index
15dd213
..
655c331
100644
(file)
--- a/
hosts_sort.c
+++ b/
hosts_sort.c
@@
-33,6
+33,10
@@
cmp(const struct bucket * const *x, const struct bucket * const *y,
a = (*x)->total;
b = (*y)->total;
break;
+ case LASTSEEN:
+ a = (*x)->u.host.last_seen;
+ b = (*y)->u.host.last_seen;
+ break;
default:
errx(1, "cmp: unknown direction: %d", dir);
}