Accpet lover case Topology descriptor (tp) as we accept other tokens in lowercase.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Dec 2011 19:10:13 +0000 (19:10 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Dec 2011 19:10:13 +0000 (19:10 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40104 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-megaco.c

index c171320dba6a296cacb3080004dc7312f0bf9041..9205f2f6968aa19895317aea4fa3244a6826808c 100644 (file)
@@ -881,7 +881,11 @@ 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);
+                               if ( (tempchar >= 'a')&& (tempchar <= 'z')){
+                    tempchar = tempchar - 0x20;
+                               }
+                if ( tempchar == 'T') {
                     tempchar = tvb_get_guint8(tvb, tvb_command_start_offset+1);
 
                     if ( (tempchar >= 'a')&& (tempchar <= 'z'))
@@ -954,6 +958,7 @@ nextcontext:
 
                 if ( tempchar != 'E' ){
 
+                                       /* Short form used */
                     if ( tvb_get_guint8(tvb, 0 ) == '!'){
 
                         switch ( tempchar ){
@@ -1122,12 +1127,17 @@ nextcontext:
                             break;
 
                         default:
-                            tokenlen =  (tvb_RBRKT+1) - tvb_previous_offset;
-                            tvb_ensure_bytes_exist(tvb, tvb_previous_offset, tokenlen);
-                            proto_tree_add_string(megaco_tree, hf_megaco_error_Frame, tvb,
-                                tvb_previous_offset, tokenlen,
-                                "No Command detectable !");
-                            return;
+                                                       {
+                                                               proto_item *item;
+
+                                                               tokenlen =  (tvb_RBRKT+1) - tvb_previous_offset;
+                                                               tvb_ensure_bytes_exist(tvb, tvb_previous_offset, tokenlen);
+                                                               item = proto_tree_add_string(megaco_tree, hf_megaco_error_Frame, tvb,
+                                                                       tvb_previous_offset, tokenlen,
+                                                                       "No Command detectable !");
+                                                               proto_item_append_text(item,"[ tempchar 0x%x ]", tempchar);
+                                                               return;
+                                                       }
                         }
                     }
                     else{