aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2018-12-14 20:06:33 -0500
committerAnders Broman <a.broman58@gmail.com>2018-12-15 07:41:03 +0000
commit8f6872e337fb78e0070a3757c48bc39f41bbb3a0 (patch)
tree4cd6619cd0c94645f4436e1cedbbb6beb11440af /ui
parente13d8be96284318b95ddafaecd6403a87f618c1c (diff)
VOIP: Always use frame number when hashing sequence analysis.
Change-Id: Id720d7857328c1f464c4568b0a279a864921b031 Reviewed-on: https://code.wireshark.org/review/31052 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/voip_calls.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index 2d3d41f4c7..566a4e29eb 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -348,7 +348,7 @@ add_to_graph(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan_dissect_t *
gai->display=FALSE;
g_queue_push_tail(tapinfo->graph_analysis->items, gai);
- g_hash_table_insert(tapinfo->graph_analysis->ht, &gai->frame_number, gai);
+ g_hash_table_insert(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(gai->frame_number), gai);
}
/****************************************************************************/
@@ -361,7 +361,7 @@ static int append_to_frame_graph(voip_calls_tapinfo_t *tapinfo, guint32 frame_nu
gchar *comment = NULL;
if(tapinfo->graph_analysis && NULL!=tapinfo->graph_analysis->ht)
- gai=(seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, &frame_num);
+ gai=(seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(frame_num));
if(gai) {
frame_label = gai->frame_label;
comment = gai->comment;
@@ -390,7 +390,7 @@ static int change_frame_graph(voip_calls_tapinfo_t *tapinfo, guint32 frame_num,
gchar *comment = NULL;
if(tapinfo->graph_analysis && NULL!=tapinfo->graph_analysis->ht)
- gai=(seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, &frame_num);
+ gai=(seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(frame_num));
if(gai) {
frame_label = gai->frame_label;
comment = gai->comment;
@@ -474,7 +474,7 @@ static void insert_to_graph_t38(voip_calls_tapinfo_t *tapinfo, packet_info *pinf
gai = (seq_analysis_item_t *)list->data;
if (gai->frame_number > frame_num) {
g_queue_insert_before(tapinfo->graph_analysis->items, list, new_gai);
- g_hash_table_insert(tapinfo->graph_analysis->ht, &new_gai->frame_number, new_gai);
+ g_hash_table_insert(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(new_gai->frame_number), new_gai);
inserted = TRUE;
break;
}
@@ -484,7 +484,7 @@ static void insert_to_graph_t38(voip_calls_tapinfo_t *tapinfo, packet_info *pinf
if (!inserted) {
g_queue_push_tail(tapinfo->graph_analysis->items, new_gai);
- g_hash_table_insert(tapinfo->graph_analysis->ht, &new_gai->frame_number, new_gai);
+ g_hash_table_insert(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(new_gai->frame_number), new_gai);
}
}
}
@@ -708,14 +708,14 @@ rtp_draw(void *tap_offset_ptr)
/* using the setup frame number of the RTP stream, we get the call number that it belongs to*/
/* voip_calls_graph_list = g_list_first(tapinfo->graph_analysis->list); */
if(tapinfo->graph_analysis){
- gai = (seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, &rtp_listinfo->setup_frame_number);
+ gai = (seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(rtp_listinfo->setup_frame_number));
}
if(gai != NULL) {
const char *comment_fmt = "%s, %u packets. Duration: %u.%03us SSRC: 0x%X";
/* Found the setup frame*/
conv_num = gai->conv_num;
/* if RTP was already in the Graph, just update the comment information */
- gai = (seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, &rtp_listinfo->start_fd->num);
+ gai = (seq_analysis_item_t *)g_hash_table_lookup(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(rtp_listinfo->start_fd->num));
if (gai != NULL) {
duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_rel_time) - nstime_to_msec(&rtp_listinfo->start_rel_time));
g_free(gai->comment);
@@ -747,7 +747,7 @@ rtp_draw(void *tap_offset_ptr)
new_gai->display=FALSE;
new_gai->line_style = 2; /* the arrow line will be 2 pixels width */
g_queue_push_tail(tapinfo->graph_analysis->items, new_gai);
- g_hash_table_insert(tapinfo->graph_analysis->ht, &rtp_listinfo->start_fd, new_gai);
+ g_hash_table_insert(tapinfo->graph_analysis->ht, GUINT_TO_POINTER(rtp_listinfo->start_fd->num), new_gai);
}
}
rtpstreams_list = g_list_next(rtpstreams_list);