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

Freeswitch SVN anthm at freeswitch.org
Mon Jul 21 10:55:49 EDT 2008


Author: anthm
Date: Mon Jul 21 10:55:49 2008
New Revision: 9120

Modified:
   freeswitch/trunk/src/switch_ivr_originate.c

Log:
fix refactor typo

Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c	(original)
+++ freeswitch/trunk/src/switch_ivr_originate.c	Mon Jul 21 10:55:49 2008
@@ -268,9 +268,11 @@
 	switch_frame_t *read_frame = NULL;
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
 	int timelimit = 60;
-	const char *var = switch_channel_get_variable(caller_channel, "call_timeout");
+	const char *var;
 	switch_time_t start = 0;
 
+	switch_assert(peer_channel);
+	
 	if (session) {
 		caller_channel = switch_core_session_get_channel(session);
 	}
@@ -282,7 +284,7 @@
 	switch_zmalloc(write_frame.data, SWITCH_RECOMMENDED_BUFFER_SIZE);
 	write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
 
-	if (var) {
+	if (caller_channel && (var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
 		timelimit = atoi(var);
 		if (timelimit < 0) {
 			timelimit = 60;



More information about the Freeswitch-svn mailing list