From 00435bf3903ca63f3cc4185dffd2cc7d08c6b8c3 Mon Sep 17 00:00:00 2001 From: Luis Ontanon Date: Thu, 24 Feb 2005 22:02:31 +0000 Subject: Update to the stats_tree tapping API - change the tap init_string to %s,tree instead of %s,stat - change the registration key (it used to be tapname, that disallowed to register more than one tap per protocol) - add a "pivot" node for convenience svn path=/trunk/; revision=13502 --- tap-stats_tree.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tap-stats_tree.c') diff --git a/tap-stats_tree.c b/tap-stats_tree.c index 8150260eb2..a09bf637b1 100644 --- a/tap-stats_tree.c +++ b/tap-stats_tree.c @@ -79,11 +79,14 @@ static void init_stats_tree(char *optarg) { } else { g_error("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"); + g_error("could not obtain stats_tree abbr (%s) from optarg '%s'",abbr,optarg); } - error_string = register_tap_listener( st->abbr, + error_string = register_tap_listener( st->tapname, st, st->filter, reset_stats_tree, @@ -102,7 +105,7 @@ void register_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) { stats_tree* st = v; st->pr = g_malloc(sizeof(tree_pres)); - st->pr->init_string = g_strdup_printf("%s,stat",st->abbr); + st->pr->init_string = g_strdup_printf("%s,tree",st->abbr); register_ethereal_tap(st->pr->init_string, init_stats_tree); -- cgit v1.2.3