]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Thu, 18 May 2006 17:08:06 +0000 (17:08 +0000)
committerAutomerge script <automerge@asterisk.org>
Thu, 18 May 2006 17:08:06 +0000 (17:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28256 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 35eedeca699dc22bbfa756b58816b1da7f442dfb..214c7aff3c1f2987bca427dd59ad71c6d9e92902 100644 (file)
@@ -2006,7 +2006,7 @@ static char *mbox(int id)
 #ifdef USE_ODBC_STORAGE
 static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
 {
-       int x = 0;
+       int x = -1;
        int res;
        SQLHSTMT stmt;
        char sql[256];
@@ -2018,6 +2018,7 @@ static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
                 *newmsgs = 0;
         if (oldmsgs)
                 *oldmsgs = 0;
+
         /* If no mailbox, return immediately */
         if (ast_strlen_zero(mailbox))
                 return 0;
@@ -2099,7 +2100,7 @@ static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
                }
                SQLFreeHandle (SQL_HANDLE_STMT, stmt);
                *oldmsgs = atoi(rowdata);
-               x = 1;
+               x = 0;
        } else
                ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);