aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-02-24 00:30:32 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-02-24 00:30:32 +0000
commitf92477f793a1d3a9aa41b95fcf3bb8d8c1da3638 (patch)
tree88b7a9ec3dc39f09bc5c30cae560ced310ae75fa /capture_sync.c
parentb7b5db354e8505aa5220fd092a1bd4ee268a47cf (diff)
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.c14
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 :