FSCORE-639

This commit is contained in:
Anthony Minessale 2010-08-02 13:48:35 -05:00
parent 04dbc7bc8e
commit 9fbe3ea2e1
1 changed files with 9 additions and 2 deletions

View File

@ -2107,14 +2107,21 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
&rb);
if ((rstatus != SWITCH_STATUS_SUCCESS && rstatus != SWITCH_STATUS_BREAK) || rb < 0) {
*bytes = rb;
return rstatus;
if (rtp_session->recv_msg_idx) {
/* Handle the data we have queued up */
break;
} else {
*bytes = rb;
return rstatus;
}
}
if (!rb) break;
rtp_session->recv_msg_array[rtp_session->recv_msg_idx].bytes = rb;
rtp_session->recv_msg_idx++;
switch_cond_next(); /* Relax just a bit */
}
if (!*bytes && rtp_session->recv_msg_idx) goto top;