Revision
14514
Author
mrene
Date
2009-08-13 21:40:48 -0500 (Thu, 13 Aug 2009)

Log Message

mod_lcr: fix possible null string passed to switch_log_printf

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c (14513 => 14514)


--- freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c	2009-08-14 01:27:44 UTC (rev 14513)
+++ freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c	2009-08-14 02:40:48 UTC (rev 14514)
@@ -1191,7 +1191,8 @@
 	routes.pool = pool;
 
 	intra = switch_channel_get_variable(channel, "intrastate");
-	switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "intrastate channel var is [%s]\n", intra);
+	switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "intrastate channel var is [%s]\n", 
+					switch_strlen_zero(intra) ? "undef" : intra);
 	if (switch_strlen_zero(intra) || strcasecmp((char *)intra, "true")) {
 		switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on interstate rates\n");
 		routes.intrastate = SWITCH_FALSE;