--- app_voicemail.c.orig 2007-05-14 11:57:58.000000000 +0200 +++ app_voicemail.c 2007-05-14 11:59:10.000000000 +0200 @@ -969,7 +969,7 @@ char msgnums[80]; struct odbc_obj *obj; - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { ast_copy_string(fmt, vmfmts, sizeof(fmt)); c = strchr(fmt, '|'); @@ -1135,7 +1135,7 @@ char rowdata[20]; struct odbc_obj *obj; - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { @@ -1193,7 +1193,7 @@ char msgnums[20]; struct odbc_obj *obj; - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { snprintf(msgnums, sizeof(msgnums), "%d", msgnum); res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); @@ -1256,7 +1256,7 @@ char msgnums[20]; struct odbc_obj *obj; - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { snprintf(msgnums, sizeof(msgnums), "%d", smsg); res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); @@ -1300,7 +1300,7 @@ struct odbc_obj *obj; delete_file(ddir, dmsg); - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { snprintf(msgnums, sizeof(msgnums), "%d", smsg); snprintf(msgnumd, sizeof(msgnumd), "%d", dmsg); @@ -1360,7 +1360,7 @@ struct odbc_obj *obj; delete_file(dir, msgnum); - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { ast_copy_string(fmt, vmfmts, sizeof(fmt)); c = strchr(fmt, '|'); @@ -1466,7 +1466,7 @@ struct odbc_obj *obj; delete_file(ddir, dmsg); - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { snprintf(msgnums, sizeof(msgnums), "%d", smsg); snprintf(msgnumd, sizeof(msgnumd), "%d", dmsg); @@ -2216,7 +2216,7 @@ } else context = "default"; - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { @@ -2316,7 +2316,7 @@ if (ast_strlen_zero(mailbox)) return 0; - obj = ast_odbc_request_obj(odbc_database, 0); + obj = ast_odbc_request_obj(odbc_database, 1); if (obj) { res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {