add some err checking to sqlite case for nonce checking

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14322 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-07-22 20:37:20 +00:00
parent 01dec7254b
commit 75d09d83bb
2 changed files with 16 additions and 4 deletions
+8 -1
View File
@@ -57,7 +57,14 @@ SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db)
SWITCH_DECLARE(const unsigned char *) switch_core_db_column_text(switch_core_db_stmt_t *stmt, int iCol)
{
return sqlite3_column_text(stmt, iCol);
const unsigned char *txt = sqlite3_column_text(stmt, iCol);
if (txt && !strcasecmp((char *)txt, "(null)")) {
txt = NULL;
}
return txt;
}
SWITCH_DECLARE(const char *) switch_core_db_column_name(switch_core_db_stmt_t *stmt, int N)