[Freeswitch-svn] [commit] r2706 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Thu Sep 14 19:48:20 EDT 2006


Author: mikej
Date: Thu Sep 14 19:48:19 2006
New Revision: 2706

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
handle no channel gracefully.

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Sep 14 19:48:19 2006
@@ -1384,7 +1384,9 @@
 				return;
 			}
 		}
-		switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
+		if (channel) {
+			switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
+		}
 		nua_respond(nh, SIP_488_NOT_ACCEPTABLE, 
 					//SIPTAG_CONTACT(tech_pvt->contact), 
 					TAG_END());
@@ -1419,7 +1421,9 @@
 				return;
 			}
 		}
-		switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
+		if (channel) {
+			switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
+		}
 		nua_respond(nh, SIP_488_NOT_ACCEPTABLE, 
 					//SIPTAG_CONTACT(tech_pvt->contact), 
 					TAG_END());
@@ -1460,7 +1464,9 @@
 				return;
 			}
 		}
-		switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
+		if (channel) {
+			switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
+		}
 		nua_respond(nh, SIP_488_NOT_ACCEPTABLE, 
 					//SIPTAG_CONTACT(tech_pvt->contact), 
 					TAG_END());



More information about the Freeswitch-svn mailing list