aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.c
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-23 21:01:04 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-23 21:01:04 +0000
commit8e94ae4d892068043015b3efd3239c984395073c (patch)
treed394bd5f75a0eeeecddb66a485f4d0cfaa6d165b /epan/dissectors/packet-cip.c
parent3731bc067486762aa426c3ba0f4fb4005218b6e9 (diff)
Let the dissectors fill the Protocol and Info columns by calling the even when tree == NULL.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26531 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-cip.c')
-rw-r--r--epan/dissectors/packet-cip.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index 61aa7462c5..236aa6168a 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -1007,7 +1007,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_len
/* F3 is the CCO */
if ( temp_data == 0xF3 )
{
- collision = 1;
+ collision = 1;
proto_item_append_text( rrsc_item, "%s (%s)",
val_to_str( ( tvb_get_guint8( tvb, offset ) & 0x7F ),
cip_sc_vals_cco , "Unknown Service (%x)"),
@@ -1078,8 +1078,8 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_len
pi = proto_tree_add_text( item_tree, tvb, offset+4+add_stat_size, item_length-4-add_stat_size, "Command Specific data" );
cmd_data_tree = proto_item_add_subtree( pi, ett_cmd_data );
- if( gen_status == CI_GRC_SUCCESS || gen_status == CI_GRC_SERVICE_ERROR )
- {
+ if( gen_status == CI_GRC_SUCCESS || gen_status == CI_GRC_SERVICE_ERROR )
+ {
/* Success responses */
if( ( tvb_get_guint8( tvb, offset ) & 0x7F ) == SC_FWD_OPEN )
@@ -1135,7 +1135,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_len
} /* End of if reply data */
} /* End of if forward open response */
- else if( ( tvb_get_guint8( tvb, offset ) & 0x7F ) == SC_FWD_CLOSE )
+ else if( ( tvb_get_guint8( tvb, offset ) & 0x7F ) == SC_FWD_CLOSE )
{
/* Forward close response (Success) */
@@ -1468,7 +1468,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_len
else if( tvb_get_guint8( tvb, offset ) == SC_UNCON_SEND )
{
/* check for collision */
- if ( collision )
+ if ( collision )
{
/* Audit Change */
@@ -1484,7 +1484,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_len
}
else
{
- /* Unconnected send */
+ /* Unconnected send */
/* Display the priority/tick timer */
temp_byte = tvb_get_guint8( tvb, offset+2+req_path_size );
@@ -1633,7 +1633,7 @@ static int
dissect_cip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
- proto_tree *cip_tree;
+ proto_tree *cip_tree = NULL;
/* Make entries in Protocol column and Info column on summary display */
if( check_col( pinfo->cinfo, COL_PROTOCOL ) )
@@ -1647,10 +1647,10 @@ dissect_cip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Create display subtree for the protocol */
ti = proto_tree_add_item(tree, proto_cip, tvb, 0, -1, FALSE);
cip_tree = proto_item_add_subtree( ti, ett_cip );
-
- dissect_cip_data( cip_tree, tvb, 0, tvb_length(tvb), pinfo );
}
+ dissect_cip_data( cip_tree, tvb, 0, tvb_length(tvb), pinfo );
+
return tvb_length(tvb);
}