aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-usb-linux.c
diff options
context:
space:
mode:
authorguy <guy>2006-10-05 17:51:01 +0000
committerguy <guy>2006-10-05 17:51:01 +0000
commita631fe8a83a66d75aadc595af1419ee624bbd8dc (patch)
tree18a66befa52d03cdb78ce43754a9d70d381db2c8 /pcap-usb-linux.c
parent748adf9a88325f0444bf782f78366533e38605d3 (diff)
From Paolo Abeni: fix a compile problem.
Diffstat (limited to 'pcap-usb-linux.c')
-rw-r--r--pcap-usb-linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c
index 99dba90..3626c75 100644
--- a/pcap-usb-linux.c
+++ b/pcap-usb-linux.c
@@ -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;
}