diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-09 23:03:57 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-10 23:43:52 +0200 |
commit | b2584c4831b40a265b63cecdf7bd2f4fca416298 (patch) | |
tree | 540a37beda42b2b7bb3afefb3bc3a03321438585 /src/gsup_server.h | |
parent | e171b00049ecf60fe45076ef69b0885af82411ff (diff) |
fix db_update_sqn(): reset stmt in all error cases
Use the common db_bind_int64() so that the stmt bindings are cleared for any
errors and to get error logging for free.
On error with sqlite3_step(), log the SQL error message, and make sure the stmt
is cleared of bindings and reset.
After sqlite3_step(), verify that exactly one row was modifed, log and return
errors otherwise.
After this patch, the DB interaction closely matches the other (refactored) DB
functions.
Change-Id: I0d870d405e2e0a830360d9ad19f0a3f9e09d8cf2
Diffstat (limited to 'src/gsup_server.h')
0 files changed, 0 insertions, 0 deletions