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

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


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


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/11/9011/1

diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c3bfeb4..4bececc 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4429,6 +4429,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/9011
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8543ad480a08c98be78bde1ee870e6e6c84b2c5b
Gerrit-Change-Number: 9011
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/726d1627/attachment-0001.html>


More information about the asterisk-code-review mailing list