Browse Source

Reduce battery usage - transmit traffic stat with binary

pull/499/head
Mygod 8 years ago
parent
commit
68eaf3b12d
1 changed files with 2 additions and 4 deletions
  1. 6
      src/android.c

6
src/android.c

@ -121,11 +121,9 @@ int send_traffic_stat(uint64_t tx, uint64_t rx)
return -1;
}
char stat[256] = { 0 };
snprintf(stat, 256, "%llu|%llu", tx, rx);
size_t len = strlen(stat);
uint64_t stat[2] = { tx, rx };
if (send(sock, stat, len, 0) == -1) {
if (send(sock, stat, sizeof(stat), 0) == -1) {
ERROR("[android] send");
close(sock);
return -1;

Loading…
Cancel
Save