Only use the sanitysql if it's not zero-len
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Aug 2007 21:44:22 +0000 (21:44 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 13 Aug 2007 21:44:22 +0000 (21:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79333 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_odbc.c

index d688930..6b70f16 100644 (file)
@@ -176,7 +176,7 @@ int ast_odbc_sanity_check(struct odbc_obj *obj)
        SQLHSTMT stmt;
        int res = 0;
 
        SQLHSTMT stmt;
        int res = 0;
 
-       if (obj->parent->sanitysql)
+       if (!ast_strlen_zero(obj->parent->sanitysql))
                test_sql = obj->parent->sanitysql;
 
        if (obj->up) {
                test_sql = obj->parent->sanitysql;
 
        if (obj->up) {