diff options
-rw-r--r-- | epan/dissectors/packet-m3ua.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-megaco.c | 28 | ||||
-rw-r--r-- | epan/dissectors/packet-mgcp.c | 10 |
3 files changed, 11 insertions, 32 deletions
diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c index 70e71e369a..75e479ce28 100644 --- a/epan/dissectors/packet-m3ua.c +++ b/epan/dissectors/packet-m3ua.c @@ -840,11 +840,9 @@ dissect_protocol_data_1_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, p static void dissect_protocol_data_2_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree, proto_tree *parameter_tree, proto_item *parameter_item) { - guint8 li; guint16 protocol_data_length; tvbuff_t *payload_tvb; - li = tvb_get_guint8(parameter_tvb, LI_OCTETT_OFFSET); protocol_data_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH - LI_OCTETT_LENGTH; payload_tvb = tvb_new_subset(parameter_tvb, PROTOCOL_DATA_2_OFFSET, protocol_data_length, protocol_data_length); proto_tree_add_item(parameter_tree, hf_li, parameter_tvb, LI_OCTETT_OFFSET, LI_OCTETT_LENGTH, ENC_BIG_ENDIAN); @@ -965,9 +963,6 @@ dissect_deregistration_result_parameter(tvbuff_t *parameter_tvb, packet_info *pi static void dissect_local_routing_key_identifier_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item) { - guint32 id; - - id = tvb_get_ntohl(parameter_tvb, LOCAL_RK_IDENTIFIER_OFFSET); proto_tree_add_item(parameter_tree, hf_local_rk_identifier, parameter_tvb, LOCAL_RK_IDENTIFIER_OFFSET, LOCAL_RK_IDENTIFIER_LENGTH, ENC_BIG_ENDIAN); proto_item_append_text(parameter_item, " (%u)", tvb_get_ntohl(parameter_tvb, LOCAL_RK_IDENTIFIER_OFFSET)); } diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index 94147252e9..52efd11cd9 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -1407,17 +1407,14 @@ static gint find_megaco_descriptors_names(tvbuff_t *tvb, int offset, guint heade static void dissect_megaco_descriptors(tvbuff_t *tvb, proto_tree *megaco_tree_command_line, packet_info *pinfo, gint tvb_descriptors_start_offset, gint tvb_descriptors_end_offset) { - gint tvb_len, len, token_index, tvb_offset, temp_offset; + gint tvb_len, token_index, tvb_offset, temp_offset; gint tvb_current_offset,tvb_previous_offset,tokenlen; - gint tvb_RBRKT, tvb_LBRKT, RBRKT_counter, LBRKT_counter; - tvb_len = tvb_length(tvb); + gint tvb_RBRKT, tvb_LBRKT; + tvb_len = tvb_length(tvb); - len = 0; tvb_RBRKT = 0; tvb_LBRKT = 0; - RBRKT_counter = 0; - LBRKT_counter = 0; tvb_LBRKT = megaco_tvb_skip_wsp(tvb, tvb_descriptors_start_offset +1); @@ -1913,7 +1910,7 @@ dissect_megaco_eventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *m { gint tokenlen, tvb_current_offset, tvb_next_offset, tvb_help_offset; - gint tvb_events_end_offset, tvb_events_start_offset, tvb_LBRKT; + gint tvb_events_end_offset, tvb_LBRKT; proto_tree *megaco_eventsdescriptor_tree, *megaco_eventsdescriptor_ti; guint8 tempchar; @@ -1925,7 +1922,6 @@ dissect_megaco_eventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *m tvb_next_offset = 0; tvb_help_offset = 0; tvb_events_end_offset = 0; - tvb_events_start_offset = 0; tvb_help_offset = 0; requested_event_start_offset = 0; requested_event_end_offset = 0; @@ -1956,7 +1952,6 @@ dissect_megaco_eventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *m tokenlen)); tvb_events_end_offset = tvb_RBRKT; - tvb_events_start_offset = tvb_previous_offset; tvb_RBRKT = tvb_next_offset+1; tvb_LBRKT = tvb_next_offset+1; @@ -2499,7 +2494,7 @@ dissect_megaco_observedeventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto { gint tokenlen, pkg_tokenlen, tvb_current_offset, tvb_next_offset, tvb_help_offset; - gint tvb_observedevents_end_offset, tvb_observedevents_start_offset, tvb_LBRKT; + gint tvb_observedevents_end_offset, tvb_LBRKT; proto_tree *megaco_observedeventsdescriptor_tree, *megaco_observedeventsdescriptor_ti; guint8 tempchar; @@ -2511,7 +2506,6 @@ dissect_megaco_observedeventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto tvb_next_offset = 0; tvb_help_offset = 0; tvb_observedevents_end_offset = 0; - tvb_observedevents_start_offset = 0; tvb_LBRKT = 0; requested_event_start_offset = 0; requested_event_end_offset = 0; @@ -2546,7 +2540,6 @@ dissect_megaco_observedeventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto tokenlen)); tvb_observedevents_end_offset = tvb_RBRKT; - tvb_observedevents_start_offset = tvb_previous_offset; tvb_RBRKT = tvb_next_offset+1; tvb_LBRKT = tvb_next_offset+1; @@ -2696,7 +2689,7 @@ dissect_megaco_Packagesdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command { gint tokenlen, tvb_current_offset, tvb_next_offset, tvb_help_offset; - gint tvb_packages_end_offset, tvb_packages_start_offset, tvb_LBRKT; + gint tvb_packages_end_offset, tvb_LBRKT; proto_tree *megaco_packagesdescriptor_tree, *megaco_packagesdescriptor_ti; tokenlen = 0; @@ -2704,7 +2697,6 @@ dissect_megaco_Packagesdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command tvb_next_offset = 0; tvb_help_offset = 0; tvb_packages_end_offset = 0; - tvb_packages_start_offset = 0; tvb_LBRKT = 0; tokenlen = (tvb_RBRKT+1) - tvb_previous_offset; @@ -2730,7 +2722,6 @@ dissect_megaco_Packagesdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command tokenlen)); tvb_packages_end_offset = tvb_RBRKT; - tvb_packages_start_offset = tvb_previous_offset; tvb_RBRKT = tvb_next_offset+1; tvb_LBRKT = tvb_next_offset+1; @@ -2895,15 +2886,12 @@ dissect_megaco_errordescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command_li gint tokenlen; gint error_code; guint8 error[4]; - gint tvb_next_offset, tvb_current_offset,tvb_len; + gint tvb_current_offset; proto_item* item; proto_item* hidden_item; - tvb_len = tvb_length(tvb); tokenlen = 0; - tvb_next_offset = 0; - tvb_current_offset = 0; - tvb_len = 0; + tvb_current_offset = 0; tvb_current_offset = tvb_find_guint8(tvb, tvb_previous_offset , tvb_RBRKT, '='); tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_current_offset +1); diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index c243873463..7722391dda 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -332,7 +332,7 @@ static int dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { gint sectionlen; guint32 num_messages; - gint tvb_sectionend,tvb_sectionbegin, tvb_len, tvb_current_len; + gint tvb_sectionend,tvb_sectionbegin, tvb_len; proto_tree *mgcp_tree, *ti; const gchar *verb_name = ""; @@ -341,7 +341,6 @@ static int dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_sectionbegin = tvb_sectionend; sectionlen = 0; tvb_len = tvb_length(tvb); - tvb_current_len = tvb_len; num_messages = 0; mgcp_tree = NULL; ti = NULL; @@ -467,7 +466,7 @@ static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * { /* Declare variables */ gint sectionlen; - gint tvb_sectionend,tvb_sectionbegin, tvb_len, tvb_current_len; + gint tvb_sectionend,tvb_sectionbegin, tvb_len; tvbuff_t *next_tvb; const gchar *verb_name = ""; @@ -500,7 +499,6 @@ static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * tvb_sectionbegin = tvb_sectionend; sectionlen = 0; tvb_len = tvb_length(tvb); - tvb_current_len = tvb_len; /* * Check to see whether we're really dealing with MGCP by looking @@ -511,7 +509,6 @@ static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * { /* dissect first line */ tvb_sectionbegin = 0; - tvb_current_len = tvb_len; tvb_sectionend = tvb_sectionbegin; sectionlen = tvb_find_line_end(tvb,0,-1,&tvb_sectionend,FALSE); if (sectionlen > 0) @@ -1773,13 +1770,12 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree static void dissect_mgcp_params(tvbuff_t *tvb, proto_tree *tree) { int linelen, tokenlen, *my_param; - gint tvb_lineend,tvb_current_len, tvb_linebegin,tvb_len,old_lineend; + gint tvb_lineend, tvb_linebegin, tvb_len, old_lineend; gint tvb_tokenbegin; proto_tree *mgcp_param_ti, *mgcp_param_tree; tvb_len = tvb_length(tvb); tvb_linebegin = 0; - tvb_current_len = tvb_length_remaining(tvb,tvb_linebegin); tvb_lineend = tvb_linebegin; if (tree) |