diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-04 15:24:14 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-04 15:24:14 +0000 |
commit | e9b47caa761c5374a4eb3a276946a49921c2a680 (patch) | |
tree | bdf654cda1ac3f67895b82ad12f50a3e1dd9256c /print.c | |
parent | 120df0ee68e945d33f42bae99d18862d4cf85355 (diff) |
Once we start printing an "opened up" (tshark -O) tree, print the entire
subtree. Otherwise subitems whose abbreviation doesn't match the protocol name
(such as text items) won't get printed.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36983 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -194,9 +194,12 @@ void proto_tree_print_node(proto_node *node, gpointer data) /* * If -O is specified, only display the protocols which are in the - * lookup table. + * lookup table. Only check on the first level: once we start printing + * a tree, print the rest of the subtree. Otherwise we won't print + * subitems whose abbreviation doesn't match the protocol--for example + * text items (whose abbreviation is simply "text"). */ - if (output_only_tables != NULL + if (output_only_tables != NULL && pdata->level == 0 && g_hash_table_lookup(output_only_tables, fi->hfinfo->abbrev) == NULL) { pdata->success = TRUE; return; @@ -648,7 +651,7 @@ static void csv_write_str(const char *str, char sep, FILE *fh) csv_str = csv_massage_str(str, NULL); fprintf(fh, "\"%s\"%c", csv_str, sep); g_free(csv_str); -} +} void proto_tree_write_csv(epan_dissect_t *edt, FILE *fh) |