summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-02-04 10:21:15 -0800
committerGuy Harris <guy@alum.mit.edu>2011-02-04 10:21:57 -0800
commitfea75330c7eec78f0ebbe8132bc05b879e8b8d40 (patch)
tree4098fa9c800cbbb9087964308ede717c7199f985
parent4bc31d4cc8753b84b5b5050aa7dc7fbbdec01f30 (diff)
downloadlibpcap-fea75330c7eec78f0ebbe8132bc05b879e8b8d40.tar.gz
Use p->oneshot_callback for pcap_next_ex(), as with pcap_next().
Thanks to Tobias C Rittweiler for catching this.
-rw-r--r--pcap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pcap.c b/pcap.c
index 91a62e45..146c09c6 100644
--- a/pcap.c
+++ b/pcap.c
@@ -199,7 +199,8 @@ pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header,
int status;
/* We are on an offline capture */
- status = pcap_offline_read(p, 1, pcap_oneshot, (u_char *)&s);
+ status = pcap_offline_read(p, 1, p->oneshot_callback,
+ (u_char *)&s);
/*
* Return codes for pcap_offline_read() are:
@@ -228,7 +229,7 @@ pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header,
* The first one ('0') conflicts with the return code of 0 from
* pcap_offline_read() meaning "end of file".
*/
- return (p->read_op(p, 1, pcap_oneshot, (u_char *)&s));
+ return (p->read_op(p, 1, p->oneshot_callback, (u_char *)&s));
}
static void