This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static void update(int fd) {
sendline(fd, "%d %d", CONTROL, REQ_DUMP_TRAFFIC);
gettimeofday(&cur, NULL);
static void update(int fd) {
sendline(fd, "%d %d", CONTROL, REQ_DUMP_TRAFFIC);
gettimeofday(&cur, NULL);
found->name = xstrdup(name);
list_insert_before(&node_list, node, found);
changed = true;
found->name = xstrdup(name);
list_insert_before(&node_list, node, found);
changed = true;
found->name = xstrdup(name);
list_insert_tail(&node_list, found);
changed = true;
found->name = xstrdup(name);
list_insert_tail(&node_list, found);
changed = true;
- qsort(sorted, n, sizeof *sorted, sortfunc);
+ if(sorted)
+ qsort(sorted, n, sizeof *sorted, sortfunc);
for(int i = 0, row = 3; i < n; i++, row++) {
nodestats_t *node = sorted[i];
for(int i = 0, row = 3; i < n; i++, row++) {
nodestats_t *node = sorted[i];