[Asterisk-code-review] app voicemail: Fix incorrect msg leaving/retrieving an ODBC ... (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Fri May 18 16:43:07 CDT 2018


Kevin Harwell has submitted this change and it was merged. ( https://gerrit.asterisk.org/8986 )

Change subject: app_voicemail: Fix incorrect msg leaving/retrieving an ODBC voicemail
......................................................................

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
---
M apps/app_voicemail.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved; Approved for Submit



diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 86f2873..9f52b08 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3961,6 +3961,10 @@
 				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;

-- 
To view, visit https://gerrit.asterisk.org/8986
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic36e97d5eb070a23a12ba45972f6b53e2182a3f4
Gerrit-Change-Number: 8986
Gerrit-PatchSet: 3
Gerrit-Owner: Nic Colledge <nic at njcolledge.net>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180518/db51a028/attachment.html>


More information about the asterisk-code-review mailing list