[asterisk-commits] tilghman: trunk r250913 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 4 22:37:40 CST 2010


Author: tilghman
Date: Thu Mar  4 22:37:36 2010
New Revision: 250913

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=250913
Log:
Missing quote in ODBC query.

(closes issue #16953)
 Reported by: elguero
 Patches: 
       app_voicemail-odbc-syntax-fix.diff uploaded by elguero (license 37)

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=250913&r1=250912&r2=250913
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Mar  4 22:37:36 2010
@@ -4973,7 +4973,7 @@
 	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		if (!strcmp(folder, "INBOX")) {
-			snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/INBOX' OR dir = '%s%s/%s/Urgent", odbc_table, VM_SPOOL_DIR, context, mailbox, VM_SPOOL_DIR, context, mailbox);
+			snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/INBOX' OR dir = '%s%s/%s/Urgent'", odbc_table, VM_SPOOL_DIR, context, mailbox, VM_SPOOL_DIR, context, mailbox);
 		} else {
 			snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, mailbox, folder);
 		}




More information about the asterisk-commits mailing list