dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 307836 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r307836 | tilghman | 2011-02-15 01:01:37 -0600 (Tue, 15 Feb 2011) | 8 lines
  
  Need to retrieve the rows affected before using the associated variable.
  
  (closes issue #18795)
   Reported by: irroot
   Patches: 
         20110211__issue18795.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@307837 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
tilghman 2011-02-15 07:02:45 +00:00
parent 02560104b4
commit a23e973d4d
1 changed files with 4 additions and 1 deletions

View File

@ -336,6 +336,10 @@ static int acf_odbc_write(struct ast_channel *chan, const char *cmd, char *s, co
}
}
if (stmt) {
SQLRowCount(stmt, &rows);
}
if (stmt && rows == 0 && ast_str_strlen(insertbuf) != 0) {
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
@ -356,7 +360,6 @@ static int acf_odbc_write(struct ast_channel *chan, const char *cmd, char *s, co
}
} else if (stmt) {
status = "SUCCESS";
SQLRowCount(stmt, &rows);
}
AST_RWLIST_UNLOCK(&queries);