From a12bdc612ad623b5f34dbc62c8e050603d8eda0f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 30 Apr 2008 07:58:57 +0000 Subject: Use report_failure() to report failures in capture_sync.c; that will do the right thing in Wireshark and TShark, as both of them call epan_init() to set the appropriate "report an error" function. That obviates the need to have TShark have its own private version of simple_dialog(). Have cmdarg_err() just call failure_message() instead of duplicating the code in failure_message(). svn path=/trunk/; revision=25201 --- tshark.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'tshark.c') diff --git a/tshark.c b/tshark.c index 4ee751f0be..f5531170c4 100644 --- a/tshark.c +++ b/tshark.c @@ -1879,26 +1879,6 @@ void main_window_update(void) { } -/* XXX - move the call to simple_dialog() out of capture_sync.c */ -#include "simple_dialog.h" - -/* capture_sync.c want's to tell us an error */ -gpointer simple_dialog(ESD_TYPE_E type _U_, gint btn_mask _U_, - const gchar *msg_format, ...) -{ - va_list ap; - - /* XXX - do we need to display buttons and alike? */ - va_start(ap, msg_format); - fprintf(stderr, "tshark: "); - vfprintf(stderr, msg_format, ap); - fprintf(stderr, "\n"); - va_end(ap); - - return NULL; -} - - /* capture child detected an error */ void capture_input_error_message(capture_options *capture_opts _U_, char *error_msg, char *secondary_error_msg) @@ -3157,9 +3137,7 @@ cmdarg_err(const char *fmt, ...) va_list ap; va_start(ap, fmt); - fprintf(stderr, "tshark: "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); + failure_message(fmt, ap); va_end(ap); } -- cgit v1.2.3