]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Statements updating zero rows may return SQL_NO_DATA. This is fine; it's handled.
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 28 Feb 2011 09:32:22 +0000 (09:32 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 28 Feb 2011 09:32:22 +0000 (09:32 +0000)
(closes issue #18815)
 Reported by: irroot
 Patches:
       func_odbc.insert_nodata.patch uploaded by irroot (license 52)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@308990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_odbc.c

index b824827339a9e715974c3aadc08ae41862b80cd6..37eddee3ba89006a3112de35b73c1ead13514247 100644 (file)
@@ -170,7 +170,7 @@ static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data)
        }
 
        res = SQLExecDirect(stmt, (unsigned char *)sql, SQL_NTS);
-       if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+       if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO) && (res != SQL_NO_DATA)) {
                if (res == SQL_ERROR) {
                        int i;
                        SQLINTEGER nativeerror=0, numfields=0;