aboutsummaryrefslogtreecommitdiffstats
path: root/capture_loop.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-05-26 19:38:26 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-05-26 19:38:26 +0000
commit2c672ff84027d191541ec1efbaa015d6f09ec37b (patch)
tree9fbaf4d77ca1fa48150aae6f433cb62d02ce9bf5 /capture_loop.c
parent6a853e1bc32bc1ab1c852b7b347dbcbc8b206502 (diff)
fix #125: as suggested, the data in rechdr has to be kept over several calls to capture_loop_dispatch, so put it in the loop_data
svn path=/trunk/; revision=14442
Diffstat (limited to 'capture_loop.c')
-rw-r--r--capture_loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/capture_loop.c b/capture_loop.c
index dc23f39d68..8b6e82a0ca 100644
--- a/capture_loop.c
+++ b/capture_loop.c
@@ -157,6 +157,7 @@ typedef struct _loop_data {
gboolean from_cap_pipe; /* TRUE if we are capturing data from a capture pipe */
#ifndef _WIN32
struct pcap_hdr cap_pipe_hdr;
+ struct pcaprec_modified_hdr cap_pipe_rechdr;
int cap_pipe_fd; /* the file descriptor of the capture pipe */
gboolean cap_pipe_modified; /* TRUE if data in the pipe uses modified pcap headers */
gboolean cap_pipe_byte_swapped; /* TRUE if data in the pipe is byte swapped */
@@ -889,7 +890,6 @@ capture_loop_dispatch(capture_options *capture_opts, loop_data *ld,
fd_set set1;
struct timeval timeout;
int sel_ret;
- struct pcaprec_modified_hdr rechdr;
guchar pcap_data[WTAP_MAX_PACKET_SIZE];
#endif
@@ -916,7 +916,7 @@ capture_loop_dispatch(capture_options *capture_opts, loop_data *ld,
/*
* "select()" says we can read from the pipe without blocking
*/
- inpkts = cap_pipe_dispatch(ld->cap_pipe_fd, ld, &ld->cap_pipe_hdr, &rechdr, pcap_data,
+ inpkts = cap_pipe_dispatch(ld->cap_pipe_fd, ld, &ld->cap_pipe_hdr, &ld->cap_pipe_rechdr, pcap_data,
errmsg, errmsg_len);
if (inpkts < 0) {
ld->go = FALSE;