From 2c65b33b2169a1a40766d55f8eb6339e7b412794 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 7 Feb 2015 00:49:31 +0100 Subject: Fix RTP crash on RTP analysis attempt The tap listener was handling rtpstream_tapinfo_t* types while other users was expecting a GList* instead. Fix this and avoid future confusion by replacing void* pointers. Ping-Bug: 10714 Change-Id: I66f62eaaed4a529714264bbf4e7ad1e72b46ce5a Reviewed-on: https://code.wireshark.org/review/6997 Reviewed-by: Gerald Combs --- ui/gtk/rtp_stream_dlg.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ui/gtk/rtp_stream_dlg.c') diff --git a/ui/gtk/rtp_stream_dlg.c b/ui/gtk/rtp_stream_dlg.c index 51eeba18b7..75b64e4a15 100644 --- a/ui/gtk/rtp_stream_dlg.c +++ b/ui/gtk/rtp_stream_dlg.c @@ -51,14 +51,14 @@ static const gchar FWD_LABEL_TEXT[] = "Select a forward stream with left mouse b static const gchar FWD_ONLY_LABEL_TEXT[] = "Select a forward stream with Ctrl + left mouse button"; static const gchar REV_LABEL_TEXT[] = "Select a reverse stream with Ctrl + left mouse button"; -static void rtpstream_dlg_update(void *ti_ptr); +static void rtpstream_tap_draw(rtpstream_tapinfo_t *ti_ptr); static void rtpstream_dlg_mark_packet(rtpstream_tapinfo_t *tapinfo, frame_data *fd); void register_tap_listener_rtp_stream_dlg(void); /* The one and only global rtpstream_tapinfo_t structure for tshark and wireshark. */ static rtpstream_tapinfo_t the_tapinfo_struct = - { rtpstream_dlg_update, rtpstream_dlg_mark_packet, NULL, 0, NULL, 0, + { rtpstream_tap_draw, rtpstream_dlg_mark_packet, NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, 0, FALSE }; @@ -1085,17 +1085,8 @@ rtpstream_dlg_create (void) /* update the contents of the dialog box list_store */ /* list: pointer to list of rtp_stream_info_t* */ static void -rtpstream_dlg_update(void *ti_ptr) +rtpstream_dlg_update(GList *list_lcl) { - GList *list_lcl; - rtpstream_tapinfo_t *tapinfo = (rtpstream_tapinfo_t *)ti_ptr; - - if (!tapinfo) { - return; - } - - list_lcl = tapinfo->strinfo_list; - if (rtp_stream_dlg != NULL) { gtk_list_store_clear(list_store); streams_nb = 0; @@ -1113,6 +1104,15 @@ rtpstream_dlg_update(void *ti_ptr) last_list = list_lcl; } +static void +rtpstream_tap_draw(rtpstream_tapinfo_t *tapinfo) +{ + if (tapinfo) { + rtpstream_dlg_update(tapinfo->strinfo_list); + } +} + + static void rtpstream_dlg_mark_packet(rtpstream_tapinfo_t *tapinfo _U_, frame_data *fd) { if (!fd) return; -- cgit v1.2.1