[Freeswitch-svn] [commit] r8200 - in freeswitch/trunk/src: . include

Freeswitch SVN brian at freeswitch.org
Fri Apr 25 19:20:24 EDT 2008


Author: brian
Date: Fri Apr 25 19:20:23 2008
New Revision: 8200

Modified:
   freeswitch/trunk/src/include/switch_cpp.h
   freeswitch/trunk/src/switch_cpp.cpp

Log:
fix buglet

Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h	(original)
+++ freeswitch/trunk/src/include/switch_cpp.h	Fri Apr 25 19:20:23 2008
@@ -148,7 +148,7 @@
 
 	int answer();
 	int preAnswer();
-	virtual void hangup(char *cause);
+	virtual void hangup(char *cause = "normal_clearing");
 	void setVariable(char *var, char *val);
 	const char *getVariable(char *var);
 

Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp	(original)
+++ freeswitch/trunk/src/switch_cpp.cpp	Fri Apr 25 19:20:23 2008
@@ -185,12 +185,13 @@
 	memset(&caller_profile, 0, sizeof(caller_profile)); 	
 	init_vars();
 	if (session = switch_core_session_locate(nuuid)) {
-		channel = switch_core_session_get_channel(session);
 		uuid = strdup(nuuid);
+		channel = switch_core_session_get_channel(session);
 		allocated = 1;
     } else {
 		switch_call_cause_t cause;
 		if (switch_ivr_originate(NULL, &session, &cause, nuuid, 60, NULL, NULL, NULL, NULL, SOF_NONE) == SWITCH_STATUS_SUCCESS) {
+			channel = switch_core_session_get_channel(session);
 			allocated = 1;
 			switch_set_flag(this, S_HUP);
 			uuid = strdup(switch_core_session_get_uuid(session));
@@ -494,6 +495,7 @@
 	}
 
     if (a_leg_session) a_leg_session->end_allow_threads();
+	channel = switch_core_session_get_channel(session);
 	allocated = 1;
 	switch_channel_set_state(switch_core_session_get_channel(session), CS_TRANSMIT);
 



More information about the Freeswitch-svn mailing list