less DATA_ACK msgs.

pull/12/head
Tom Early 7 years ago
parent 57d13e046f
commit 1a8e61b221

@ -205,6 +205,7 @@ void CQnetITAP::Run(const char *cfgfile)
bool is_alive = false; bool is_alive = false;
std::chrono::steady_clock::time_point lastdata = std::chrono::steady_clock::now(); std::chrono::steady_clock::time_point lastdata = std::chrono::steady_clock::now();
bool wasone = false;
while (keep_running) { while (keep_running) {
fd_set readfds; fd_set readfds;
FD_ZERO(&readfds); FD_ZERO(&readfds);
@ -271,10 +272,13 @@ void CQnetITAP::Run(const char *cfgfile)
printf("\n"); printf("\n");
break; break;
case RT_DATA_ACK: case RT_DATA_ACK:
if (buf[3] || wasone) {
wasone = buf[3] ? true : false;
printf("DATA_ACK"); printf("DATA_ACK");
for (int i=0; i<int(buf[0]) && i<100; i++) for (int i=0; i<int(buf[0]) && i<100; i++)
printf(" %02X", buf[i]); printf(" %02X", buf[i]);
printf("\n"); printf("\n");
}
break; break;
case RT_PONG: case RT_PONG:
if (! is_alive) { if (! is_alive) {

Loading…
Cancel
Save

Powered by TurnKey Linux.