print generated items in brackets [], just as we do it on the screen
authorUlf Lamping <ulf.lamping@web.de>
Sat, 22 Jul 2006 11:29:17 +0000 (11:29 -0000)
committerUlf Lamping <ulf.lamping@web.de>
Sat, 22 Jul 2006 11:29:17 +0000 (11:29 -0000)
svn path=/trunk/; revision=18783

print.c

diff --git a/print.c b/print.c
index 4c1f019aec9c62383a98e82bf13b47fc058286b8..f0fdff87224a0c8c078ca3c81d312e5910052060 100644 (file)
--- a/print.c
+++ b/print.c
@@ -154,11 +154,19 @@ void proto_tree_print_node(proto_node *node, gpointer data)
                proto_item_fill_label(fi, label_str);
        }
 
+    if(PROTO_ITEM_IS_GENERATED(node)) {
+        label_ptr = g_strdup_printf("[%s]", label_ptr);
+    }
+
        if (!print_line(pdata->stream, pdata->level, label_ptr)) {
                pdata->success = FALSE;
                return;
        }
 
+    if(PROTO_ITEM_IS_GENERATED(node)) {
+        g_free(label_ptr);
+    }
+
        /* If it's uninterpreted data, dump it (unless our caller will
           be printing the entire packet in hex). */
        if (fi->hfinfo->id == proto_data && pdata->print_hex_for_data) {