aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-02 00:07:43 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-02 00:07:43 +0000
commit3b99bad465bea18be54fb5615bf17a9e62d4f16d (patch)
tree7f76e81e9d95b22637b2b9ca01f1349d99b61564 /main/rtp.c
parent7d2f53e55782a0a3086ef17f52a97a507d4351e7 (diff)
Merged revisions 221777 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r221777 | tilghman | 2009-10-01 18:59:15 -0500 (Thu, 01 Oct 2009) | 9 lines Merged revisions 221776 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r221776 | tilghman | 2009-10-01 18:53:12 -0500 (Thu, 01 Oct 2009) | 2 lines Fix a bunch of off-by-one errors ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@221780 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 8b96a7a66..b81f8e01c 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2241,7 +2241,7 @@ int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, i
*/
void ast_rtp_set_m_type(struct ast_rtp* rtp, int pt)
{
- if (pt < 0 || pt > MAX_RTP_PT || static_RTP_PT[pt].code == 0)
+ if (pt < 0 || pt >= MAX_RTP_PT || static_RTP_PT[pt].code == 0)
return; /* bogus payload type */
rtp_bridge_lock(rtp);
@@ -2253,7 +2253,7 @@ void ast_rtp_set_m_type(struct ast_rtp* rtp, int pt)
an unknown media type */
void ast_rtp_unset_m_type(struct ast_rtp* rtp, int pt)
{
- if (pt < 0 || pt > MAX_RTP_PT)
+ if (pt < 0 || pt >= MAX_RTP_PT)
return; /* bogus payload type */
rtp_bridge_lock(rtp);
@@ -2274,7 +2274,7 @@ int ast_rtp_set_rtpmap_type_rate(struct ast_rtp *rtp, int pt,
unsigned int i;
int found = 0;
- if (pt < 0 || pt > MAX_RTP_PT)
+ if (pt < 0 || pt >= MAX_RTP_PT)
return -1; /* bogus payload type */
rtp_bridge_lock(rtp);
@@ -2349,7 +2349,7 @@ struct rtpPayloadType ast_rtp_lookup_pt(struct ast_rtp* rtp, int pt)
result.isAstFormat = result.code = 0;
- if (pt < 0 || pt > MAX_RTP_PT)
+ if (pt < 0 || pt >= MAX_RTP_PT)
return result; /* bogus payload type */
/* Start with negotiated codecs */
@@ -3786,7 +3786,7 @@ struct ast_codec_pref *ast_rtp_codec_getpref(struct ast_rtp *rtp)
int ast_rtp_codec_getformat(int pt)
{
- if (pt < 0 || pt > MAX_RTP_PT)
+ if (pt < 0 || pt >= MAX_RTP_PT)
return 0; /* bogus payload type */
if (static_RTP_PT[pt].isAstFormat)