From 436d17fa502134540eec7140d8528a26ecc3f14b Mon Sep 17 00:00:00 2001 From: Nic Colledge Date: Sat, 12 May 2018 12:53:13 +0100 Subject: [PATCH] app_voicemail: Fix incorrect msg leaving/retrieving an ODBC voicemail Correct the log warning message shown when ODBC voicemail retrieve_file is called and there is a null value in the category column. A more meaningfull message is now written at debug level. ASTERISK-27853 Change-Id: Ic36e97d5eb070a23a12ba45972f6b53e2182a3f4 --- apps/app_voicemail.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 86f2873a5c..9f52b082be 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3961,6 +3961,10 @@ static int retrieve_file(char *dir, int msgnum) generate_msg_id(msg_id); snprintf(rowdata, sizeof(rowdata), "%s", msg_id); odbc_update_msg_id(dir, msgnum, msg_id); + } else if (res == SQL_NULL_DATA && !strcasecmp(coltitle, "category")) { + /* Ignore null column value for category */ + ast_debug(3, "Ignoring null category column in ODBC voicemail retrieve_file.\n"); + continue; } else if (!SQL_SUCCEEDED(res)) { ast_log(AST_LOG_WARNING, "SQL Get Data error! coltitle=%s\n[%s]\n\n", coltitle, sql); goto bail_with_handle; -- 2.47.2