Browse Source

fix build error

pull/465/head
Max Lv 9 years ago
parent
commit
f226d47ea4
2 changed files with 3 additions and 3 deletions
  1. 2
      src/android.c
  2. 4
      src/local.c

2
src/android.c

@ -122,7 +122,7 @@ int send_traffic_stat(uint64_t tx, uint64_t rx)
}
char stat[256] = {0};
snprintf(stat, 256, "%" PRIu64 "|%" PRIu64, tx, rx);
snprintf(stat, 256, "%llu|%llu", tx, rx);
size_t len = strlen(stat);
if (send(sock, stat, len, 0) == -1) {

4
src/local.c

@ -1156,7 +1156,7 @@ int main(int argc, char **argv)
#ifdef ANDROID
ev_timer_init(&stat_timer, stat_update_cb, 1, 1);
ev_timer_start(loop, stat_timer);
ev_timer_start(loop, &stat_timer);
#endif
// Setup socket
@ -1202,7 +1202,7 @@ int main(int argc, char **argv)
// Clean up
#ifdef ANDROID
ev_timer_stop(loop, stat_timer);
ev_timer_stop(loop, &stat_timer);
#endif
ev_io_stop(loop, &listen_ctx.io);

Loading…
Cancel
Save