]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 250913 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 5 Mar 2010 04:42:16 +0000 (04:42 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 5 Mar 2010 04:42:16 +0000 (04:42 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r250913 | tilghman | 2010-03-04 22:37:36 -0600 (Thu, 04 Mar 2010) | 7 lines

  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/branches/1.6.1@250914 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index a61599279917889e9d57af144ff22a72a1c5acf3..c9008645327e72b56dda805967954fe34519e48c 100644 (file)
@@ -4686,7 +4686,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);
                }