When a device first boots, there won't be any tethering stats, which
isn't an error. Continue checking for partial results.
Bug:
5868832
Change-Id: Ic432f5f159320da9886d85c2525fa2cde8c67750
TetherStats stats;
char *buffPtr;
int64_t packets, bytes;
- int statsFound = 0;
bool filterPair = filter.intIface[0] && filter.extIface[0];
stats = filter;
}
free(msg);
- statsFound++;
}
}
- /* We found some stats, and the last one isn't a partial stats. */
- if (statsFound && (stats.rxBytes == -1 || stats.txBytes == -1)) {
+ /* Successful if the last stats entry wasn't partial. */
+ if ((stats.rxBytes == -1) == (stats.txBytes == -1)) {
cli->sendMsg(ResponseCode::CommandOkay, "Tethering stats list completed", false);
return 0;
}