diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-05-04 15:24:14 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-05-04 15:24:14 +0000 |
commit | 2a7adf624a1092a82c1d65c404c4fad3881e1af9 (patch) | |
tree | bdf654cda1ac3f67895b82ad12f50a3e1dd9256c /print.c | |
parent | aac86cad85a86ffbc0cf1769fe7b484832626e5f (diff) | |
download | wireshark-2a7adf624a1092a82c1d65c404c4fad3881e1af9.tar.gz wireshark-2a7adf624a1092a82c1d65c404c4fad3881e1af9.tar.bz2 wireshark-2a7adf624a1092a82c1d65c404c4fad3881e1af9.zip |
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.
svn path=/trunk/; revision=36983
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) |