]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_lcr: fix possible null string passed to switch_log_printf
authorMathieu Rene <mrene@avgs.ca>
Fri, 14 Aug 2009 02:40:48 +0000 (02:40 +0000)
committerMathieu Rene <mrene@avgs.ca>
Fri, 14 Aug 2009 02:40:48 +0000 (02:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14514 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_lcr/mod_lcr.c

index cc7af003158b8051d9655cc2fdba63127746f329..90a9fb8ddabc119cfae292c4dd50881bb2b7f110 100644 (file)
@@ -1191,7 +1191,8 @@ SWITCH_STANDARD_APP(lcr_app_function)
        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;