diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-05-13 13:26:06 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-05-13 11:31:31 +0000 |
commit | 6d1b6f46927fe6bd9edfcd9ef63e74ab94f039ac (patch) | |
tree | 7fb4f6100d0768b42781ad6b6ba62ca7f77bb0bb /ui/voip_calls.c | |
parent | 0bf4299ec9d4e53d0d0b3db50bf1ede35f8d57a3 (diff) | |
download | wireshark-6d1b6f46927fe6bd9edfcd9ef63e74ab94f039ac.tar.gz |
[VoIP] There has to be two separate routines for MEGACO and H248 as
tap_id_offset is used to access tapinfo. Fixes a crash rported in
Bug: 11132
Change-Id: I32ada3e0eb16d0e128ff67c5aec499890602eab0
Reviewed-on: https://code.wireshark.org/review/8449
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/voip_calls.c')
-rw-r--r-- | ui/voip_calls.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/ui/voip_calls.c b/ui/voip_calls.c index 911d760049..c937b8c073 100644 --- a/ui/voip_calls.c +++ b/ui/voip_calls.c @@ -2782,9 +2782,9 @@ remove_tap_listener_actrace_calls(voip_calls_tapinfo_t *tap_id_base) type == GCP_CMD_NOTIFY_REQ || type == GCP_CMD_SVCCHG_REQ || type == GCP_CMD_TOPOLOGY_REQ || \ type == GCP_CMD_CTX_ATTR_AUDIT_REQ ) + static gboolean -h248_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) { - voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_h248_); +h248_calls_packet_common(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) { const gcp_cmd_t *cmd = (const gcp_cmd_t *)prot_info; GList *list; voip_calls_info_t *callsinfo = NULL; @@ -2881,6 +2881,20 @@ h248_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, return TRUE; } +static gboolean +h248_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) { + voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_h248_); + + return h248_calls_packet_common(tapinfo, pinfo, edt, prot_info); +} + +static gboolean +megaco_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) { + voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_megaco_); + + return h248_calls_packet_common(tapinfo, pinfo, edt, prot_info); +} + void h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) { @@ -2890,7 +2904,7 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) NULL, 0, NULL, - h248_calls_packet, + megaco_calls_packet, NULL); if (error_string != NULL) { |