diff options
author | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-02-24 22:02:31 +0000 |
---|---|---|
committer | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-02-24 22:02:31 +0000 |
commit | 6dbfbc1bfdcd581e3e00ffe1c1022f3205386146 (patch) | |
tree | 6a7d408f0b018fbedabd2b8e7893535b769a536e /tap-stats_tree.c | |
parent | 4eb223a12092659c90e35ef3a0029055e062b0ae (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
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13502 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tap-stats_tree.c')
-rw-r--r-- | tap-stats_tree.c | 9 |
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); |