diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-02-04 10:21:15 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-02-04 10:21:57 -0800 |
commit | fea75330c7eec78f0ebbe8132bc05b879e8b8d40 (patch) | |
tree | 4098fa9c800cbbb9087964308ede717c7199f985 | |
parent | 4bc31d4cc8753b84b5b5050aa7dc7fbbdec01f30 (diff) | |
download | libpcap-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |