ndt-dev - [ndt-dev] [ndt] r785 committed - Fix a bug where the pcap tracing process would crash instead of exitin...
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r785 committed - Fix a bug where the pcap tracing process would crash instead of exitin...
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r785 committed - Fix a bug where the pcap tracing process would crash instead of exitin...
- Date: Fri, 26 Oct 2012 15:03:36 +0000
Revision: 785
Author:
Date: Fri Oct 26 07:31:56 2012
Log: Fix a bug where the pcap tracing process would crash instead of exiting
http://code.google.com/p/ndt/source/detail?r=785
Modified:
/trunk/src/web100-pcap.c
=======================================
--- /trunk/src/web100-pcap.c Tue Oct 16 08:22:53 2012
+++ /trunk/src/web100-pcap.c Fri Oct 26 07:31:56 2012
@@ -135,8 +135,9 @@
usleep(30000); /* wait here 30 msec, for parent to
read this data */
print_bins(&rev, mon_pipe1);
usleep(30000); /* wait here 30 msec, for parent to
read this data */
- if (pd != NULL)
- pcap_close(pd);
+ if (pd != NULL) {
+ pcap_breakloop(pd);
+ }
if (dumptrace == 1)
pcap_dump_close(pdump);
sig1 = 2;
@@ -175,8 +176,9 @@
usleep(30000); /* wait here 30 msec, for parent to
read this data */
print_bins(&rev, mon_pipe2);
usleep(30000); /* wait here 30 msec, for parent to
read this data */
- if (pd != NULL)
- pcap_close(pd);
+ if (pd != NULL) {
+ pcap_breakloop(pd);
+ }
if (dumptrace == 1)
pcap_dump_close(pdump);
sig2 = 2;
@@ -1020,6 +1022,9 @@
if (pcap_loop(pd, cnt, printer, pcap_userdata) < 0) {
log_println(5, "pcap_loop exited %s", pcap_geterr(pd));
}
+
+ pcap_close(pd);
+
log_println(
5,
"Pkt-Pair data collection ended, waiting for signal to terminate process");
- [ndt-dev] [ndt] r785 committed - Fix a bug where the pcap tracing process would crash instead of exitin..., ndt, 10/26/2012
Archive powered by MHonArc 2.6.16.