summaryrefslogtreecommitdiff
path: root/channels/sip
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-01-24 16:40:42 +0000
committerDavid M. Lee <dlee@digium.com>2013-01-24 16:40:42 +0000
commit14a9fb761b9aa543d889af89c75026d41a23c787 (patch)
treeb45f1ab100bd05a662f0903a61064550e8570b73 /channels/sip
parentbde00a2e03050531550de31bdd2e955e18c7d6ee (diff)
Corrected crypto tag in SDP ANSWER for SRTP.
When Asterisk responds with an SDP ANSWER for SRTP, it had the code to correctly fill in the crypto data, which was overwritten by a call to sdp_crypto_offer. Corrected the situation by changing sdp_crypto_offer to not replacing crypto data if it already exists. (closes issue ASTERISK-20849) Reported by: José Luis Millán Tested by: Iñaki Baz Castillo Patches: fix_sdp_crypto_tags.diff uploaded by Pedro Kiefer (license 6407) ........ Merged revisions 380043 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip')
-rw-r--r--channels/sip/sdp_crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/sip/sdp_crypto.c b/channels/sip/sdp_crypto.c
index 85ddfe2f4..ba21316d9 100644
--- a/channels/sip/sdp_crypto.c
+++ b/channels/sip/sdp_crypto.c
@@ -291,7 +291,7 @@ int sdp_crypto_offer(struct sdp_crypto *p, int taglen)
char crypto_buf[128];
if (p->a_crypto) {
- ast_free(p->a_crypto);
+ return 0;
}
if (snprintf(crypto_buf, sizeof(crypto_buf), "a=crypto:1 AES_CM_128_HMAC_SHA1_%i inline:%s\r\n",