From 8045d1f0a86863448d16350e65f26c2f5bc5db23 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 2 Sep 2008 14:50:03 +0000 Subject: [PATCH] fix MODAPP-134 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9404 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_limit/mod_limit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_limit/mod_limit.c b/src/mod/applications/mod_limit/mod_limit.c index 06bc7b13a6..bc477b8751 100644 --- a/src/mod/applications/mod_limit/mod_limit.c +++ b/src/mod/applications/mod_limit/mod_limit.c @@ -80,7 +80,9 @@ static switch_status_t limit_execute_sql(char *sql, switch_mutex_t *mutex) if (switch_odbc_handle_exec(globals.master_odbc, sql, &stmt) != SWITCH_ODBC_SUCCESS) { char *err_str; err_str = switch_odbc_handle_get_error(globals.master_odbc, stmt); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERR: [%s]\n[%s]\n", sql, switch_str_nil(err_str)); + if ( err_str && strlen(err_str) ) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERR: [%s]\n[%s]\n", sql, switch_str_nil(err_str)); + } switch_safe_free(err_str); status = SWITCH_STATUS_FALSE; }