aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2006-10-08 22:39:23 +0000
committerUlf Lamping <ulf.lamping@web.de>2006-10-08 22:39:23 +0000
commit599ca2b82423b3107a04c9f7f6f0126cf39ffabb (patch)
tree0482b54616011e1e2d2a6cf4c6f5afbd118db62d /tshark.c
parente70c6303e12c69a2b339aa8d17811bcf5512da72 (diff)
from Richard van der Hoff:
> [tshark from a fifo] > Ulf - I notice you made the relevant change here (r16787) - is there any reason why tshark shouldn't use capture_loop_dispatch to do its processing, rather than attempting to use cap_pipe_dispatch or pcap_dispatch directly? well, there didn't seem to be, so I've made a patch which does exactly this, and which fixes the problem. svn path=/trunk/; revision=19456
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tshark.c b/tshark.c
index 0c63e05638..ad55fceae6 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1522,7 +1522,6 @@ capture(void)
condition *volatile cnd_autostop_size = NULL;
condition *volatile cnd_autostop_duration = NULL;
char *descr;
- guchar pcap_data[WTAP_MAX_PACKET_SIZE];
#ifndef _WIN32
void (*oldhandler)(int);
#endif
@@ -1703,10 +1702,8 @@ capture(void)
each packet. */
pcap_cnt = 1;
}
- if (ld.from_cap_pipe) {
- inpkts = cap_pipe_dispatch(&ld, pcap_data, errmsg, sizeof errmsg);
- } else
- inpkts = pcap_dispatch(ld.pcap_h, pcap_cnt, ld.packet_cb, (u_char *) &ld);
+
+ inpkts = capture_loop_dispatch(NULL, &ld, errmsg, sizeof errmsg);
if (inpkts < 0) {
/* Error from "pcap_dispatch()", or error or "no more packets" from
"cap_pipe_dispatch(). */