From: John Hodge Date: Sat, 19 Feb 2011 03:31:35 +0000 (+0800) Subject: Fixed debug in cokebank X-Git-Url: https://git.ucc.asn.au/?p=tpg%2Fopendispense2.git;a=commitdiff_plain;h=9c119e47d915602306488e37909cf500898b722b Fixed debug in cokebank --- diff --git a/src/cokebank_sqlite/main.c b/src/cokebank_sqlite/main.c index bcb6735..504ec4e 100644 --- a/src/cokebank_sqlite/main.c +++ b/src/cokebank_sqlite/main.c @@ -553,7 +553,9 @@ sqlite3_stmt *Bank_int_QuerySingle(sqlite3 *Database, const char *Query) // Prepare query ret = Bank_int_MakeStatemnt(Database, Query); if( !ret ) { + #if DEBUG printf("Bank_int_QuerySingle: RETURN NULL ret=NULL\n"); + #endif return NULL; } @@ -561,7 +563,9 @@ sqlite3_stmt *Bank_int_QuerySingle(sqlite3 *Database, const char *Query) rv = sqlite3_step(ret); // - Empty result set if( rv == SQLITE_DONE ) { + #if DEBUG printf("Bank_int_QuerySingle: RETURN NULL (rv == SQLITE_DONE)\n"); + #endif return NULL; } // - Other error @@ -571,7 +575,9 @@ sqlite3_stmt *Bank_int_QuerySingle(sqlite3 *Database, const char *Query) return NULL; } + #if DEBUG printf("Bank_int_QuerySingle: RETURN %p\n", ret); + #endif return ret; }