summaryrefslogtreecommitdiff
path: root/ui/gtk/rtp_stream_dlg.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-02-07 00:49:31 +0100
committerGerald Combs <gerald@wireshark.org>2015-02-07 02:16:06 +0000
commit2c65b33b2169a1a40766d55f8eb6339e7b412794 (patch)
tree1f681d0deeea15ad7008267a15fc31110f6e103a /ui/gtk/rtp_stream_dlg.c
parent6f22eb6f7f2ba3034a1f5b2155d70f7c22eb9c68 (diff)
downloadwireshark-2c65b33b2169a1a40766d55f8eb6339e7b412794.tar.gz
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 <gerald@wireshark.org>
Diffstat (limited to 'ui/gtk/rtp_stream_dlg.c')
-rw-r--r--ui/gtk/rtp_stream_dlg.c24
1 files changed, 12 insertions, 12 deletions
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;
@@ -1114,6 +1105,15 @@ rtpstream_dlg_update(void *ti_ptr)
}
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;