From 3e5938a540be1d0d6c96e611822b7a266444c833 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Mon, 14 May 2018 19:02:54 -0400 Subject: [PATCH] FS-11162: [zrtp] Hangup race causing rare crash on zrtp calls --- src/switch_rtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index a45a0a66c5..58232552e7 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1330,6 +1330,10 @@ static int zrtp_send_rtp_callback(const zrtp_stream_t *stream, char *rtp_packet, switch_size_t len = rtp_packet_length; zrtp_status_t status = zrtp_status_ok; + if (!rtp_session->sock_output) { + return status; + } + switch_socket_sendto(rtp_session->sock_output, rtp_session->remote_addr, 0, rtp_packet, &len); return status; } -- 2.47.2