diff options
author | Guy Harris <guy@alum.mit.edu> | 2008-04-30 07:58:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2008-04-30 07:58:57 +0000 |
commit | a12bdc612ad623b5f34dbc62c8e050603d8eda0f (patch) | |
tree | 913216231ffff34e94cd71cdb3ec89fd8154315f /tshark.c | |
parent | 6ffb831268a43d50d0ae1b3db779fa7f38adf666 (diff) | |
download | wireshark-a12bdc612ad623b5f34dbc62c8e050603d8eda0f.tar.gz wireshark-a12bdc612ad623b5f34dbc62c8e050603d8eda0f.tar.bz2 wireshark-a12bdc612ad623b5f34dbc62c8e050603d8eda0f.zip |
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
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 24 |
1 files changed, 1 insertions, 23 deletions
@@ -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); } |