[asterisk-commits] oej: branch oej/lingon-srtp-key-lifetime-1.8 r398926 - /team/oej/lingon-srtp-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 12 09:37:41 CDT 2013


Author: oej
Date: Thu Sep 12 09:37:39 2013
New Revision: 398926

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398926
Log:
Don't assume a lifetime parameter. As proven by tests with a SNOM phone.

Modified:
    team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c

Modified: team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c?view=diff&rev=398926&r1=398925&r2=398926
==============================================================================
--- team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c (original)
+++ team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c Thu Sep 12 09:37:39 2013
@@ -276,13 +276,15 @@
 
 			/* The next one can be either lifetime or MKI */
 			lifetime = strsep(&info, "|");
-			/* Is this MKI? */
-			mki = strchr(lifetime, ':');
-			if (mki != NULL) {
-				mki = lifetime;
-				lifetime = NULL;
-			} else {
-				mki = strsep(&info, "|");
+			if (lifetime) {
+				/* Is this MKI? */
+				mki = strchr(lifetime, ':');
+				if (mki != NULL) {
+					mki = lifetime;
+					lifetime = NULL;
+				} else {
+					mki = strsep(&info, "|");
+				}
 			}
 			
 			ast_debug(3, "==> SRTP SDES lifetime %s MKI %s \n", lifetime ? lifetime : "-", mki?mki : "-");




More information about the asterisk-commits mailing list