aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-09-25 21:29:36 +0000
committerGuy Harris <guy@alum.mit.edu>2009-09-25 21:29:36 +0000
commit3a92e1e456ac6a2cbcd4e145584131a1e685d608 (patch)
treed137c86e78fb88563abe495f4fcc617ca7113c9a /epan/packet.c
parent426870cd900373bb09961e5a82d1301690e18b6e (diff)
The data sources can be used even if the protocol tree isn't being built
or isn't visible. Clean up some indentation. svn path=/trunk/; revision=30158
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 82d78ccb1c..f54fe474e5 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -220,16 +220,23 @@ add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, const char *name)
src = ep_alloc(sizeof (data_source));
src->tvb = tvb;
- src->name_initialized = FALSE;
+ src->name_initialized = FALSE;
src->name = name;
pinfo->data_src = g_slist_append(pinfo->data_src, src);
}
+/*
+ * This should only add a data source to the list of data sources for
+ * a frame if the data sources are being used. Note that they can
+ * be used even if the protocol tree isn't being built or isn't visible,
+ * e.g. if you run tshark with -x but without -V or anything else to
+ * cause the protocol tree to be built.
+ */
void
-packet_add_new_data_source(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, const char *name)
+packet_add_new_data_source(packet_info *pinfo, proto_tree *tree _U_,
+ tvbuff_t *tvb, const char *name)
{
- if (tree && PTREE_DATA(tree)->visible)
- add_new_data_source(pinfo, tvb, name);
+ add_new_data_source(pinfo, tvb, name);
}
const char*