if (elapsed > 30000) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "No stun for a long time (PUNT!)\n");
- status = SWITCH_STATUS_FALSE;
+ status = SWITCH_STATUS_GENERR;
goto end;
}
}
}
if (rtp_session->ice.ice_user) {
- if (ice_out(rtp_session, &rtp_session->ice) != SWITCH_STATUS_SUCCESS) {
+ if (ice_out(rtp_session, &rtp_session->ice) == SWITCH_STATUS_GENERR) {
ret = -1;
goto end;
}
if (!rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
if (rtp_session->rtcp_ice.ice_user) {
- if (ice_out(rtp_session, &rtp_session->rtcp_ice) != SWITCH_STATUS_SUCCESS) {
+ if (ice_out(rtp_session, &rtp_session->rtcp_ice) == SWITCH_STATUS_GENERR) {
ret = -1;
goto end;
}
status = switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock_input, 0, (void *) &rtp_session->recv_msg, bytes);
- check_rtcp_and_ice(rtp_session);
+ if (check_rtcp_and_ice(rtp_session) == -1) {
+ return SWITCH_STATUS_GENERR;
+ }
if (rtp_session->flags[SWITCH_RTP_FLAG_UDPTL]) {
goto udptl;
}
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
- check_rtcp_and_ice(rtp_session);
+ if (check_rtcp_and_ice(rtp_session) == -1) {
+ ret = -1;
+ goto end;
+ }
} else if ((!(io_flags & SWITCH_IO_FLAG_NOBLOCK)) &&
(rtp_session->dtmf_data.out_digit_dur == 0)) {