aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-08-25 15:48:28 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-08-25 15:48:28 +0000
commitf1ba6f515f9fe9dfee44177666a5048f1e4602f4 (patch)
treeed7460f45d0e0ac53a4b77f3caff3ddec0458705
parent1b8f8ffcb35abeda1e2f62d12651217a6589249f (diff)
http://bugs.ethereal.com/bugzilla/show_bug.cgi?id=377
svn path=/trunk/; revision=15530
-rw-r--r--gtk/stats_tree_stat.c7
-rw-r--r--tap-stats_tree.c10
2 files changed, 11 insertions, 6 deletions
diff --git a/gtk/stats_tree_stat.c b/gtk/stats_tree_stat.c
index 7d9640b8e3..d08c2f5365 100644
--- a/gtk/stats_tree_stat.c
+++ b/gtk/stats_tree_stat.c
@@ -31,6 +31,7 @@
#include <gtk/gtk.h>
#include <epan/stats_tree_priv.h>
+#include <epan/report_err.h>
#include "simple_dialog.h"
#include "globals.h"
@@ -236,12 +237,12 @@ static void init_gtk_tree(const char* optarg) {
st = stats_tree_new(cfg,pr,NULL);
}
} else {
- g_error("no such stats_tree (%s) found in stats_tree registry",abbr);
+ report_failure("no such stats_tree (%s) found in stats_tree registry",abbr);
}
g_free(abbr);
} else {
- g_error("could not obtain stats_tree abbr from optarg");
+ report_failure("could not obtain stats_tree abbr from optarg");
}
window_name = g_strdup_printf("%s Stats Tree", cfg->name);
@@ -336,7 +337,7 @@ static void init_gtk_tree(const char* optarg) {
/* error, we failed to attach to the tap. clean up */
simple_dialog( ESD_TYPE_ERROR, ESD_BTN_OK, error_string->str );
/* destroy_stat_tree_window(st); */
- g_error("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string->str);
+ report_failure("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string->str);
g_string_free(error_string, TRUE);
}
diff --git a/tap-stats_tree.c b/tap-stats_tree.c
index 5c40acd367..c7996fd80d 100644
--- a/tap-stats_tree.c
+++ b/tap-stats_tree.c
@@ -32,6 +32,7 @@
#include <glib.h>
#include <epan/stats_tree_priv.h>
#include <epan/stat_cmd_args.h>
+#include <epan/report_err.h>
/* actually unused */
struct _st_node_pres {
@@ -84,13 +85,15 @@ static void init_stats_tree(const char *optarg) {
st->filter=NULL;
}
} else {
- g_error("no such stats_tree (%s) found in stats_tree registry",abbr);
+ report_failure("no such stats_tree (%s) found in stats_tree registry",abbr);
+ return;
}
g_free(abbr);
} else {
- g_error("could not obtain stats_tree abbr (%s) from optarg '%s'",abbr,optarg);
+ report_failure("could not obtain stats_tree abbr (%s) from optarg '%s'",abbr,optarg);
+ return;
}
error_string = register_tap_listener( st->cfg->tapname,
@@ -101,7 +104,8 @@ static void init_stats_tree(const char *optarg) {
draw_stats_tree);
if (error_string) {
- g_error("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string->str);
+ report_failure("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string->str);
+ return;
}
if (cfg->init) cfg->init(st);