mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Missing quote in ODBC query.
(closes issue #16953) Reported by: elguero Patches: app_voicemail-odbc-syntax-fix.diff uploaded by elguero (license 37) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4973,7 +4973,7 @@ static int messagecount(const char *context, const char *mailbox, const char *fo
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user