summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-megaco.c
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@ericsson.com>2008-10-30 09:53:43 +0000
committerBalint Reczey <balint.reczey@ericsson.com>2008-10-30 09:53:43 +0000
commitf763c88092fcf80df72b3a0825dd5c8a1aed3cc2 (patch)
tree5e0f5e569cc473436688c40c8ecf357e5749f44e /epan/dissectors/packet-megaco.c
parentbe69cc2732d1611f052075045c7bf3c858e55662 (diff)
downloadwireshark-f763c88092fcf80df72b3a0825dd5c8a1aed3cc2.tar.gz
Try to dissect the Topology Descriptor before the command
This fixes bug 2665 svn path=/trunk/; revision=26620
Diffstat (limited to 'epan/dissectors/packet-megaco.c')
-rw-r--r--epan/dissectors/packet-megaco.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c
index 79b42a1f87..21c86214e0 100644
--- a/epan/dissectors/packet-megaco.c
+++ b/epan/dissectors/packet-megaco.c
@@ -881,6 +881,36 @@ nextcontext:
tvb_next_offset = tvb_command_start_offset + tokenlen;
+ /* Try to dissect Topology Descriptor before the command */
+ if ( tvb_get_guint8(tvb, tvb_command_start_offset ) == 'T') {
+ tempchar = tvb_get_guint8(tvb, tvb_command_start_offset+1);
+
+ if ( (tempchar >= 'a')&& (tempchar <= 'z'))
+ tempchar = tempchar - 0x20;
+
+ if ( tempchar == 'P' || tempchar == 'O'){
+ tvb_command_end_offset = tvb_find_guint8(tvb, tvb_command_start_offset, tvb_len, '}');
+ tvb_command_start_offset = tvb_find_guint8(tvb, tvb_command_start_offset, tvb_len, '{');
+ dissect_megaco_topologydescriptor(tvb, megaco_tree_command_line, tvb_command_end_offset-1, tvb_command_start_offset+1);
+ tvb_next_offset = tvb_command_end_offset;
+
+ /* Command after Topology Descriptor */
+ tvb_command_start_offset = tvb_find_guint8(tvb, tvb_command_end_offset +1,
+ tvb_len, ',');
+
+ if ( tvb_command_start_offset == -1 ){
+ /* No Command present after Topology Descriptor */
+ break;
+
+ } else {
+ /* Try to find the first char of the command */
+ tvb_command_start_offset = megaco_tvb_skip_wsp_return(tvb, tvb_command_start_offset + 1);
+
+ }
+
+ }
+ }
+
/* Additional value */
if ( tvb_get_guint8(tvb, tvb_command_start_offset ) == 'O'){