[asterisk-commits] file: trunk r60898 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 9 05:33:50 MST 2007


Author: file
Date: Mon Apr  9 07:33:49 2007
New Revision: 60898

URL: http://svn.digium.com/view/asterisk?view=rev&rev=60898
Log:
Make RTP session ID and session version generation random. (issue #9456 reported by tjardick)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=60898&r1=60897&r2=60898
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Apr  9 07:33:49 2007
@@ -6481,7 +6481,7 @@
 	}
 	
 	if (!p->sessionid) {
-		p->sessionid = getpid();
+		p->sessionid = (int)ast_random();
 		p->sessionversion = p->sessionid;
 	} else
 		p->sessionversion++;
@@ -6668,7 +6668,7 @@
 
 	/* Set RTP Session ID and version */
 	if (!p->sessionid) {
-		p->sessionid = getpid();
+		p->sessionid = (int)ast_random();
 		p->sessionversion = p->sessionid;
 	} else
 		p->sessionversion++;



More information about the asterisk-commits mailing list