[asterisk-commits] kmoore: branch kmoore/pimp_sip_srtp r386344 - /team/kmoore/pimp_sip_srtp/chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 23 10:30:07 CDT 2013


Author: kmoore
Date: Tue Apr 23 10:30:04 2013
New Revision: 386344

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386344
Log:
Make sure that chan_sip actually compiles and functions

Modified:
    team/kmoore/pimp_sip_srtp/channels/chan_sip.c

Modified: team/kmoore/pimp_sip_srtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/pimp_sip_srtp/channels/chan_sip.c?view=diff&rev=386344&r1=386343&r2=386344
==============================================================================
--- team/kmoore/pimp_sip_srtp/channels/chan_sip.c (original)
+++ team/kmoore/pimp_sip_srtp/channels/chan_sip.c Tue Apr 23 10:30:04 2013
@@ -12993,7 +12993,8 @@
 static char *crypto_get_attrib(struct ast_sdp_srtp *srtp, int dtls_enabled, int default_taglen_32)
 {
 	char *a_crypto;
-	if (ast_asprintf(&a_crypto, "a=crypto:%s\r\n", ast_sdp_srtp_get_attrib(srtp, dtls_enabled, default_taglen_32)) == -1) {
+	char *orig_crypto = ast_strdupa(ast_sdp_srtp_get_attrib(srtp, dtls_enabled, default_taglen_32));
+	if (ast_asprintf(&a_crypto, "a=crypto:%s\r\n", orig_crypto) == -1) {
 		return NULL;
 	}
 	return a_crypto;
@@ -13037,9 +13038,9 @@
 	struct ast_str *a_video = ast_str_create(256); /* Attributes for video */
 	struct ast_str *a_text = ast_str_create(256);  /* Attributes for text */
 	struct ast_str *a_modem = ast_str_alloca(1024); /* Attributes for modem */
-	RAII_VAR(const char *, a_crypto, NULL, ast_free);
-	RAII_VAR(const char *, v_a_crypto, NULL, ast_free);
-	RAII_VAR(const char *, t_a_crypto, NULL, ast_free);
+	RAII_VAR(char *, a_crypto, NULL, ast_free);
+	RAII_VAR(char *, v_a_crypto, NULL, ast_free);
+	RAII_VAR(char *, t_a_crypto, NULL, ast_free);
 
 	int x;
 	struct ast_format tmp_fmt;




More information about the asterisk-commits mailing list