extcap: Fixed end application loop logic

This commit is contained in:
j.novak@netsystem.cz 2022-10-03 10:16:57 +00:00 committed by AndersBroman
parent 4026590bd0
commit e091e8755a
2 changed files with 3 additions and 3 deletions

View File

@ -350,7 +350,7 @@ static int handle_data(struct nl_cache_ops *unused _U_, struct genl_cmd *cmd _U_
memcpy(&packet[2], data, data_size);
if (dump_packet(pcap_fp, packet, data_size + 2, ts) == EXIT_FAILURE)
extcap_end_application = FALSE;
extcap_end_application = TRUE;
return NL_OK;
}

View File

@ -317,12 +317,12 @@ static void run_listener(const char* fifo, const guint16 port, const char* proto
#else
ws_warning("Error in recvfrom: %s (errno=%d)", strerror(errno), errno);
#endif
extcap_end_application = FALSE;
extcap_end_application = TRUE;
break;
}
} else {
if (dump_packet(proto_name, port, buf, buflen, clientaddr, fp) == EXIT_FAILURE)
extcap_end_application = FALSE;
extcap_end_application = TRUE;
}
}