[Asterisk-code-review] app voicemail: Fix data-type mismatch between app voicemail ... (asterisk[15])

Nic Colledge asteriskteam at digium.com
Thu May 17 17:17:42 CDT 2018


Nic Colledge has uploaded this change for review. ( https://gerrit.asterisk.org/9010


Change subject: app_voicemail: Fix data-type mismatch between app_voicemail and database
......................................................................

app_voicemail: Fix data-type mismatch between app_voicemail and database

Fix data-type mismatch between app_voicemail and database columns
exposed by new version of MariaDB

ASTERISK-27760

Change-Id: I8543ad480a08c98be78bde1ee870e6e6c84b2c5b
---
M apps/app_voicemail.c
1 file changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/9010/1

diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 8d22cec..b194203 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4410,6 +4410,14 @@
 		else
 			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,flag,msg_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", odbc_table);
 
+		if (ast_strlen_zero(idata.origtime)) {
+			idata.origtime = "0";
+		}
+
+		if (ast_strlen_zero(idata.duration)) {
+			idata.duration = "0";
+		}
+
 		if ((stmt = ast_odbc_direct_execute(obj, insert_data_cb, &idata))) {
 			SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 		} else {

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8543ad480a08c98be78bde1ee870e6e6c84b2c5b
Gerrit-Change-Number: 9010
Gerrit-PatchSet: 1
Gerrit-Owner: Nic Colledge <nic at njcolledge.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180517/dbf06b8f/attachment.html>


More information about the asterisk-code-review mailing list