aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-02 00:03:52 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-02 00:03:52 +0000
commitfc37758f12d5bf290d334cd611be1d23cc8dc06e (patch)
treef52977cbbd77b873fbf468836acd179311e4bd1b /main/rtp.c
parent42d527ddcafc1c438ff88492f2b4e38d83138e94 (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.0@221778 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 5ee8ecae6..94736ebf6 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2024,7 +2024,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);
@@ -2036,7 +2036,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);
@@ -2056,7 +2056,7 @@ int ast_rtp_set_rtpmap_type(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);
@@ -2106,7 +2106,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 */
@@ -3245,7 +3245,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)