aboutsummaryrefslogtreecommitdiffstats
path: root/tap-stats_tree.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-02-24 22:02:31 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-02-24 22:02:31 +0000
commit00435bf3903ca63f3cc4185dffd2cc7d08c6b8c3 (patch)
tree6a7d408f0b018fbedabd2b8e7893535b769a536e /tap-stats_tree.c
parent2ed9ca813b9caa1797b4d57e3ee15ff9acd8aaf8 (diff)
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
Diffstat (limited to 'tap-stats_tree.c')
-rw-r--r--tap-stats_tree.c9
1 files changed, 6 insertions, 3 deletions
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);