From 7e93ce0ce06434b0bf3cebceb685a531395f7058 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 14 Feb 2008 17:45:54 +0000 Subject: [PATCH] avoid printing blank err git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7607 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_glue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 0907e2fb72..46869e0fa4 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -2257,7 +2257,9 @@ void sofia_glue_execute_sql(sofia_profile_t *profile, switch_bool_t master, char if (switch_odbc_handle_exec(profile->master_odbc, sql, &stmt) != SWITCH_ODBC_SUCCESS) { char *err_str; err_str = switch_odbc_handle_get_error(profile->master_odbc, stmt); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERR: [%s]\n[%s]\n", sql, switch_str_nil(err_str)); + if (!switch_strlen_zero(err_str)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERR: [%s]\n[%s]\n", sql, err_str); + } switch_safe_free(err_str); } SQLFreeHandle(SQL_HANDLE_STMT, stmt);