summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-05-04 15:24:14 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-05-04 15:24:14 +0000
commit2a7adf624a1092a82c1d65c404c4fad3881e1af9 (patch)
treebdf654cda1ac3f67895b82ad12f50a3e1dd9256c /print.c
parentaac86cad85a86ffbc0cf1769fe7b484832626e5f (diff)
downloadwireshark-2a7adf624a1092a82c1d65c404c4fad3881e1af9.tar.gz
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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/print.c b/print.c
index 1de8bbfde5..bc5b5ac05a 100644
--- a/print.c
+++ b/print.c
@@ -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)