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

Freeswitch SVN mikej at freeswitch.org
Mon Dec 24 18:32:02 EST 2007


Author: mikej
Date: Mon Dec 24 18:32:01 2007
New Revision: 6976

Modified:
   freeswitch/trunk/src/switch_core_session.c

Log:
whoops.

Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c	(original)
+++ freeswitch/trunk/src/switch_core_session.c	Mon Dec 24 18:32:01 2007
@@ -199,16 +199,17 @@
 		return SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED;
 	}
 
-	forwardvar = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
-	if (!switch_strlen_zero(forwardvar)) {
-		forwardval =  atoi(forwardvar) - 1;
-	}
-	if (forwardval <= 0) {
-		return SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR;
-	}
-
 	if (session) {
 		channel = switch_core_session_get_channel(session);
+
+		forwardvar = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
+		if (!switch_strlen_zero(forwardvar)) {
+			forwardval =  atoi(forwardvar) - 1;
+		}
+		if (forwardval <= 0) {
+			return SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR;
+		}
+
 		if (caller_profile) {
 			const char *ecaller_id_name = NULL, *ecaller_id_number = NULL;
 



More information about the Freeswitch-svn mailing list