[Freeswitch-svn] [commit] r7995 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon Mar 31 22:34:59 EDT 2008


Author: mikej
Date: Mon Mar 31 22:34:58 2008
New Revision: 7995

Modified:
   freeswitch/trunk/src/switch_cpp.cpp

Log:
potential fix for MODLANG-54

Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp	(original)
+++ freeswitch/trunk/src/switch_cpp.cpp	Mon Mar 31 22:34:58 2008
@@ -85,10 +85,12 @@
 {
 	memset(&caller_profile, 0, sizeof(caller_profile)); 
 	init_vars();
-	session = new_session;
-	channel = switch_core_session_get_channel(session);
-	allocated = 1;
-	switch_core_session_read_lock(session);
+	if (new_session) {
+		session = new_session;
+		channel = switch_core_session_get_channel(session);
+		allocated = 1;
+		switch_core_session_read_lock(session);
+	}
 }
 
 CoreSession::~CoreSession()



More information about the Freeswitch-svn mailing list