From ae6b75a0c2cda482ba8d12eb99bf382bc65641b4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 22 Nov 2013 06:08:56 +0500 Subject: [PATCH] fix build --- src/switch_rtp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 7206a5d8e0..90bd4d9275 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1485,6 +1485,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s if ((j = atoi(host)) && j > 223 && j < 240) { /* mcast */ + switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session"); + if (switch_mcast_interface(new_sock, rtp_session->local_addr) != SWITCH_STATUS_SUCCESS) { *err = "Multicast Socket interface Error"; goto done; @@ -1495,8 +1497,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s goto done; } - if (rtp_session->session) { - switch_channel_t *channel = switch_core_session_get_channel(rtp_session->session); + if (session) { + switch_channel_t *channel = switch_core_session_get_channel(session); const char *var; if ((var = switch_channel_get_variable(channel, "multicast_ttl"))) {