aboutsummaryrefslogtreecommitdiffstats
path: root/ui/voip_calls.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-11-24 14:51:13 -0600
committerGerald Combs <gerald@wireshark.org>2014-11-26 00:04:05 +0000
commit2ebaa59a3b195c30b1b3aa746c266ee6159fe6f7 (patch)
tree977b20e058e48d23571aa1576d8ef0a8935be118 /ui/voip_calls.c
parent5b360a96716eb9aadb91096108c23c047d7bcb70 (diff)
Consolidate sequence analysis code.
Move scattered code for seq_analysis_info_t creation and destruction to tap-sequence-analysis.[ch]. Change-Id: I87c14b1c83105a48d0ab149a3abba71e2a2fe21f Reviewed-on: https://code.wireshark.org/review/5479 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/voip_calls.c')
-rw-r--r--ui/voip_calls.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index ac46d404e5..5e42156025 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -267,8 +267,6 @@ void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base)
}
}
-static void graph_analysis_data_init(voip_calls_tapinfo_t *tapinfo);
-
/****************************************************************************/
/* when there is a [re]reading of packet's */
void
@@ -276,7 +274,6 @@ voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
{
voip_calls_info_t *callsinfo;
voip_rtp_stream_info_t *strinfo;
- seq_analysis_item_t *graph_item;
GList *list = NULL;
/* free the data items first */
@@ -304,25 +301,10 @@ voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
/* free the graph data items first */
if(NULL == tapinfo->graph_analysis) {
- graph_analysis_data_init(tapinfo);
+ tapinfo->graph_analysis = sequence_analysis_info_new();
}
- if (NULL != tapinfo->graph_analysis->ht) {
- g_hash_table_remove_all(tapinfo->graph_analysis->ht);
- }
- list = g_queue_peek_nth_link(tapinfo->graph_analysis->items, 0);
- while (list)
- {
- graph_item = (seq_analysis_item_t *)list->data;
- g_free(graph_item->frame_label);
- g_free(graph_item->comment);
- g_free((void *)graph_item->src_addr.data);
- g_free((void *)graph_item->dst_addr.data);
- g_free(graph_item->time_str);
- g_free(list->data);
- list = g_list_next(list);
- }
- g_queue_clear(tapinfo->graph_analysis->items);
+ sequence_analysis_list_free(tapinfo->graph_analysis);
/* free the strinfo data items first */
list = g_list_first(tapinfo->rtp_stream_list);
@@ -345,14 +327,6 @@ voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
}
/****************************************************************************/
-void
-graph_analysis_data_init(voip_calls_tapinfo_t *tapinfo) {
- tapinfo->graph_analysis = (seq_analysis_info_t *) g_new0(seq_analysis_info_t, 1);
- tapinfo->graph_analysis->items = g_queue_new();
- tapinfo->graph_analysis->ht= g_hash_table_new(g_int_hash, g_int_equal);
-}
-
-/****************************************************************************/
/* Add a new item into the graph */
static void
add_to_graph(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan_dissect_t *edt, const gchar *frame_label, const gchar *comment, guint16 call_num, address *src_addr, address *dst_addr, guint16 line_style)