]> The Tcpdump Group git mirrors - libpcap/commitdiff
From Paolo Abeni: fix a compile problem.
authorguy <guy>
Thu, 5 Oct 2006 17:51:01 +0000 (17:51 +0000)
committerguy <guy>
Thu, 5 Oct 2006 17:51:01 +0000 (17:51 +0000)
pcap-usb-linux.c

index 99dba902966ab00b6370fc6719354f68c83b5441..3626c75e01b0ce0aedf12b3ed662b61b41af40ed 100644 (file)
@@ -353,7 +353,7 @@ usb_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *u
         * a partial information.
         * At least until linux 2.6.17 there is no way to set usbmon intenal buffer
         * length and default value is 130. */
-       while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < handle->snaplen))
+       while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < handle->snapshot))
        {
                rawdata[0] = ascii_to_int(string[0]) * 16 + ascii_to_int(string[1]);
                rawdata++;
@@ -368,6 +368,7 @@ got:
        if (pkth.caplen > handle->snapshot)
                pkth.caplen = handle->snapshot;
 
+
        callback(user, &pkth, handle->buffer);
        return 1;
 }