diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-02-23 19:59:38 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-02-23 19:59:38 +0000 |
commit | 8d4f01eea70c59acb0ef18acbc4f5254d4149e9f (patch) | |
tree | e87d1ef9d38dc5f7c31485b5f2c073d9f04188cc /capture_sync.c | |
parent | e6837f14d463998df7b8cb71d4408e60b8a73fb0 (diff) |
Ensure tshark/wireshark always get good err msgs from dumpcap:
1. Clean up dumpcap 'as a child' err msg handling so that:
- all err msgs are properly formatted when being sent
back to the parent.
- any log Critical, Warning, etc messages
are sent back to parent and are properly formatted.
2. Change handling of -w <...> slightly in capture_opts.c
so that wireshark provides a good error message if
there is a 'write permissions' issue on the file.
(Previously the error popup said only
"Child exited with status 2").
This fixes bug #2288.
Add some conditionalized DEBUG_CHILD_DUMPCAP code for
dumpcap debug logging to a file.
svn path=/trunk/; revision=24446
Diffstat (limited to 'capture_sync.c')
-rw-r--r-- | capture_sync.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/capture_sync.c b/capture_sync.c index f2d137d516..c7d5589cd8 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -291,6 +291,8 @@ sync_pipe_start(capture_options *capture_opts) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "We don't know where to find dumpcap."); return FALSE; } + + g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "argv[0]: %s", argv[0]); argv = sync_pipe_add_arg(argv, &argc, "-i"); argv = sync_pipe_add_arg(argv, &argc, capture_opts->iface); @@ -1105,6 +1107,7 @@ pipe_read_block(int pipe, char *indicator, int len, char *msg) { return -1; } + /* XXX If message is "2part", the msg probably won't be sent to debug log correctly */ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "read %d ok indicator: %c len: %u msg: %s", pipe, *indicator, len, msg); |