]> The Tcpdump Group git mirrors - libpcap/commitdiff
Use p->oneshot_callback for pcap_next_ex(), as with pcap_next().
authorGuy Harris <[email protected]>
Fri, 4 Feb 2011 18:21:15 +0000 (10:21 -0800)
committerGuy Harris <[email protected]>
Fri, 4 Feb 2011 18:21:15 +0000 (10:21 -0800)
Thanks to Tobias C Rittweiler for catching this.

pcap.c

diff --git a/pcap.c b/pcap.c
index 91a62e4545afd5c8fbf159ccc293be76f7263e03..146c09c60e9170b466986d170d141ec0962a59ae 100644 (file)
--- 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