return FALSE;
break;
}
+
+ /* XXX - currently won't work with non real-time mode */
+ cf_callback_invoke(cf_cb_live_capture_started, capture_opts->cf);
}
return TRUE;
we registered get called. */
main_window_quit();
}
+
+ cf_callback_invoke(cf_cb_live_capture_finished, capture_opts->cf);
+
} else {
/* this is a normal mode capture, read in the capture file data */
capture_input_read_all(capture_opts, cf_is_tempfile(capture_opts->cf),
g_warning("SnapLen (%u): %u", capture_opts->has_snaplen, capture_opts->snaplen);
g_warning("Promisc : %u", capture_opts->promisc_mode);
g_warning("LinkType : %d", capture_opts->linktype);
- g_warning("SaveFile : %s", capture_opts->save_file);
+ g_warning("SaveFile : %s", (capture_opts->save_file) ? capture_opts->save_file : "");
g_warning("RealTimeMode : %u", capture_opts->real_time_mode);
g_warning("ShowInfo : %u", capture_opts->show_info);
g_warning("QuitAfterCap : %u", capture_opts->quit_after_cap);
argv = sync_pipe_add_arg(argv, &argc, sautostop_duration);
}
- if (!capture_opts->show_info) {
+ if (!capture_opts->show_info && capture_opts->real_time_mode /* XXX */) {
argv = sync_pipe_add_arg(argv, &argc, "-H");
}
cf_status_t cf_status;
cf_status = cf_open(cf, fname, is_tempfile, err);
- if (cf_status == CF_OK) {
- cf_callback_invoke(cf_cb_live_capture_started, cf);
- }
return cf_status;
}
WTAP_ENCAP_PER_PACKET). */
cf->lnk_t = wtap_file_encap(cf->wth);
- cf_callback_invoke(cf_cb_live_capture_finished, cf);
-
if (*err != 0) {
/* We got an error reading the capture file.
XXX - pop up a dialog box? */
packets (yes, I know, we don't have any *yet*). */
set_menus_for_captured_packets(TRUE);
- capture_msg = g_strdup_printf(" %s: <live capture in progress>", get_interface_descriptive_name(capture_opts->iface));
+ if(capture_opts->iface) {
+ capture_msg = g_strdup_printf(" %s: <live capture in progress>", get_interface_descriptive_name(capture_opts->iface));
+ } else {
+ capture_msg = g_strdup_printf(" <live capture in progress>");
+ }
statusbar_push_file_msg(capture_msg);