diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-02-24 00:30:32 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-02-24 00:30:32 +0000 |
commit | f92477f793a1d3a9aa41b95fcf3bb8d8c1da3638 (patch) | |
tree | 88b7a9ec3dc39f09bc5c30cae560ced310ae75fa /capture_sync.c | |
parent | b7b5db354e8505aa5220fd092a1bd4ee268a47cf (diff) | |
download | wireshark-f92477f793a1d3a9aa41b95fcf3bb8d8c1da3638.tar.gz wireshark-f92477f793a1d3a9aa41b95fcf3bb8d8c1da3638.tar.bz2 wireshark-f92477f793a1d3a9aa41b95fcf3bb8d8c1da3638.zip |
if capture filename passed to parent, save it. Will currently take no effect.
svn path=/trunk/; revision=13487
Diffstat (limited to 'capture_sync.c')
-rw-r--r-- | capture_sync.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/capture_sync.c b/capture_sync.c index efd7e896a4..f654d18d08 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -535,6 +535,9 @@ sync_pipe_input_cb(gint source, gpointer user_data) int err; + /* we are a capture parent */ + g_assert(!capture_opts->capture_child); + if ((nread = read(source, buffer, BUFSIZE)) <= 0) { /* The child has closed the sync pipe, meaning it's not going to be capturing any more packets. Pick up its exit status, and @@ -651,11 +654,16 @@ sync_pipe_input_cb(gint source, gpointer user_data) msglen -= chars_to_copy; } *r = '\0'; - /*simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, msg);*/ - /* XXX - save the current filename?! */ - if(capture_opts->sync_mode) { + /* currently, both filenames must be equal */ + /* (this will change, when multiple files together with sync_mode are captured) */ + g_assert(strcmp(capture_opts->save_file, msg) == 0); + + /* save the new filename */ + if(capture_opts->save_file != NULL) { + g_free(capture_opts->save_file); } + capture_opts->save_file = g_strdup(msg); g_free(msg); break; default : |