automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Automerge script
2006-05-18 17:08:06 +00:00
parent f209b6fe9b
commit 1da1f4e939

View File

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