From d9c274bebf6df89cc96d06d10735c134bd17011b Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Fri, 11 Mar 2016 17:36:11 +0100 Subject: Add IAX2 and Skinny calls to VoIP calls window Bug: 12254 Change-Id: Ibaddfaf8018be673d8f2cf642b1127062d7d507d Reviewed-on: https://code.wireshark.org/review/14423 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin --- ui/voip_calls.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/voip_calls.c b/ui/voip_calls.c index a65b67e21e..568d74d573 100644 --- a/ui/voip_calls.c +++ b/ui/voip_calls.c @@ -3907,9 +3907,22 @@ skinny_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1); g_free(comment); + tapinfo->redraw |= REDRAW_SKINNY; + return TRUE; } +/****************************************************************************/ +static void +skinny_calls_draw(void *tap_offset_ptr) +{ + voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_skinny_); + + if (tapinfo->tap_draw && (tapinfo->redraw & REDRAW_SKINNY)) { + tapinfo->tap_draw(tapinfo); + tapinfo->redraw &= ~REDRAW_SKINNY; + } +} /****************************************************************************/ /* TAP INTERFACE */ @@ -3931,7 +3944,7 @@ skinny_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) TL_REQUIRES_PROTO_TREE, NULL, skinny_calls_packet, - NULL + skinny_calls_draw ); if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, @@ -4032,10 +4045,23 @@ iax2_calls_packet( void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt add_to_graph(tapinfo, pinfo, edt, ii->messageName, "", callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1); + tapinfo->redraw |= REDRAW_IAX2; + return TRUE; } +/****************************************************************************/ +static void +iax2_calls_draw(void *tap_offset_ptr) +{ + voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_iax2_); + + if (tapinfo->tap_draw && (tapinfo->redraw & REDRAW_IAX2)) { + tapinfo->tap_draw(tapinfo); + tapinfo->redraw &= ~REDRAW_IAX2; + } +} /****************************************************************************/ /* TAP INTERFACE */ @@ -4060,7 +4086,7 @@ iax2_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) TL_REQUIRES_PROTO_TREE, NULL, iax2_calls_packet, - NULL + iax2_calls_draw ); if (error_string != NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", -- cgit v1.2.3