fix all the bugs introduced by recent chainsaw massacre

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1132 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2006-04-12 20:48:47 +00:00
parent 4959cbff2b
commit d91f8ef358
3 changed files with 26 additions and 27 deletions

View File

@@ -544,7 +544,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_read(switch_rtp *rtp_session, void *dat
int bytes = rtp_common_read(rtp_session, data, payload_type, flags);
if (bytes <= 0) {
if (bytes < 0) {
*datalen = 0;
return SWITCH_STATUS_GENERR;
}
@@ -562,7 +562,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp *rtp_session,
int bytes = rtp_common_read(rtp_session, data, payload_type, flags);
*data = rtp_session->recv_msg.body;
if (bytes <= 0) {
if (bytes < 0) {
*datalen = 0;
return SWITCH_STATUS_GENERR;
}