Index: app_voicemail.c =================================================================== --- app_voicemail.c (revision 26564) +++ app_voicemail.c (working copy) @@ -2014,7 +2014,7 @@ #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]; @@ -2118,7 +2118,7 @@ SQLFreeHandle (SQL_HANDLE_STMT, stmt); odbc_release_obj(obj); *oldmsgs = atoi(rowdata); - x = 1; + x = 0; } else ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);