summaryrefslogtreecommitdiff
path: root/capture_sync.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-03-11 20:00:39 +0000
committerGuy Harris <guy@alum.mit.edu>2012-03-11 20:00:39 +0000
commit7f6caeb730c78d00eaaa5f3bb2645cb83948edac (patch)
treead0ff8548cb4db9794ceefff20d4e7034a25b9b8 /capture_sync.c
parent648694228212496910d180a1d4d2883231725cc1 (diff)
downloadwireshark-7f6caeb730c78d00eaaa5f3bb2645cb83948edac.tar.gz
If the length is bogus in a message received from the sync pipe, dump
out all 4 bytes we read, to provide more information about the message that was sent so it's easier to see if something was spewing extra output to the standard output or error in the child. svn path=/trunk/; revision=41489
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 04614b2ebe..386452c839 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -1513,8 +1513,9 @@ pipe_read_block(int pipe_fd, char *indicator, int len, char *msg,
/* does the data fit into the given buffer? */
if(required > len) {
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG,
- "read %d length error, required %d > len %d, indicator: %u",
- pipe_fd, required, len, *indicator);
+ "read %d length error, required %d > len %d, header: 0x%02x 0x%02x 0x%02x 0x%02x",
+ pipe_fd, required, len,
+ header[0], header[1], header[2], header[3]);
/* we have a problem here, try to read some more bytes from the pipe to debug where the problem really is */
memcpy(msg, header, sizeof(header));