bugfixes: bring non real-time captures back to former behaviour, other minor fixes

svn path=/trunk/; revision=13961
This commit is contained in:
Ulf Lamping 2005-03-28 21:05:53 +00:00
parent 778c9abaea
commit 0b132c9b1d
5 changed files with 13 additions and 8 deletions

View File

@ -221,6 +221,9 @@ capture_input_new_file(capture_options *capture_opts, gchar *new_file)
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;
@ -292,6 +295,9 @@ capture_input_closed(capture_options *capture_opts)
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),

View File

@ -97,7 +97,7 @@ capture_opts_info(capture_options *capture_opts) {
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);

View File

@ -324,7 +324,7 @@ sync_pipe_do_capture(capture_options *capture_opts, gboolean is_tempfile) {
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");
}

5
file.c
View File

@ -503,9 +503,6 @@ cf_start_tail(capture_file *cf, const char *fname, gboolean is_tempfile, int *er
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;
}
@ -612,8 +609,6 @@ cf_finish_tail(capture_file *cf, int *err)
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? */

View File

@ -1326,7 +1326,11 @@ main_cf_cb_live_capture_started(capture_options *capture_opts)
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);