diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-14 19:04:48 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-14 19:04:48 +0000 |
commit | 6583688474069059d629a1670deef5e5fff0a68d (patch) | |
tree | c2cff7af7ee620faebfebfa5537e6353cec72b1e /rtp.c | |
parent | a3d46f310471f1d2c40061fca60debbed1c601eb (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@9987 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rw-r--r-- | rtp.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright (C) 1999 - 2006, Digium, Inc. + * Copyright (C) 1999 - 2005, Digium, Inc. * * Mark Spencer <markster@digium.com> * @@ -811,6 +811,17 @@ int ast_rtp_lookup_code(struct ast_rtp* rtp, const int isAstFormat, const int co return rtp->rtp_lookup_code_cache_result; } + /* Check the dynamic list first */ + for (pt = 0; pt < MAX_RTP_PT; ++pt) { + if (rtp->current_RTP_PT[pt].code == code && rtp->current_RTP_PT[pt].isAstFormat == isAstFormat) { + rtp->rtp_lookup_code_cache_isAstFormat = isAstFormat; + rtp->rtp_lookup_code_cache_code = code; + rtp->rtp_lookup_code_cache_result = pt; + return pt; + } + } + + /* Then the static list */ for (pt = 0; pt < MAX_RTP_PT; ++pt) { if (static_RTP_PT[pt].code == code && static_RTP_PT[pt].isAstFormat == isAstFormat) { rtp->rtp_lookup_code_cache_isAstFormat = isAstFormat; |