forked from osmocom/wireshark
From Rob Leslie <rob@mars.org>:
[PATCH] Fix dumpcap believing error on ^C i.e. pcap_breakloop() When ^C was pressed during a packet capture, dumpcap believed a pcap error had occurred. We check the return value more closely to avoid this problem. svn path=/trunk/; revision=29510
This commit is contained in:
parent
035231b534
commit
98d79569e0
|
@ -1615,7 +1615,10 @@ capture_loop_dispatch(capture_options *capture_opts _U_, loop_data *ld,
|
|||
inpkts = pcap_dispatch(ld->pcap_h, 1, capture_loop_packet_cb,
|
||||
(u_char *)ld);
|
||||
if (inpkts < 0) {
|
||||
ld->pcap_err = TRUE;
|
||||
if (inpkts == -1) {
|
||||
/* Error, rather than pcap_breakloop(). */
|
||||
ld->pcap_err = TRUE;
|
||||
}
|
||||
ld->go = FALSE; /* error or pcap_breakloop() - stop capturing */
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue