diff --git a/src/ssb.connections.c b/src/ssb.connections.c index b6eabcca..90c4d5f5 100644 --- a/src/ssb.connections.c +++ b/src/ssb.connections.c @@ -182,9 +182,10 @@ static void _tf_ssb_connections_update_work(tf_ssb_t* ssb, void* user_data) if (sqlite3_bind_text(statement, 1, update->host, -1, NULL) == SQLITE_OK && sqlite3_bind_int(statement, 2, update->port) == SQLITE_OK && sqlite3_bind_text(statement, 3, update->key, -1, NULL) == SQLITE_OK) { - if (sqlite3_step(statement) != SQLITE_DONE) + int r = sqlite3_step(statement); + if (r != SQLITE_DONE) { - tf_printf("tf_ssb_connections_set_attempted: %s.\n", sqlite3_errmsg(db)); + tf_printf("tf_ssb_connections_set_attempted: %s aka %s.\n", sqlite3_errstr(r), sqlite3_errmsg(db)); } } sqlite3_finalize(statement); @@ -197,9 +198,10 @@ static void _tf_ssb_connections_update_work(tf_ssb_t* ssb, void* user_data) if (sqlite3_bind_text(statement, 1, update->host, -1, NULL) == SQLITE_OK && sqlite3_bind_int(statement, 2, update->port) == SQLITE_OK && sqlite3_bind_text(statement, 3, update->key, -1, NULL) == SQLITE_OK) { - if (sqlite3_step(statement) != SQLITE_DONE) + int r = sqlite3_step(statement); + if (r != SQLITE_DONE) { - tf_printf("tf_ssb_connections_set_succeeded: %s.\n", sqlite3_errmsg(db)); + tf_printf("tf_ssb_connections_set_succeeded: %s aka %s.\n", sqlite3_errstr(r), sqlite3_errmsg(db)); } } sqlite3_finalize(statement); @@ -215,7 +217,7 @@ static void _tf_ssb_connections_update_work(tf_ssb_t* ssb, void* user_data) int r = sqlite3_step(statement); if (r != SQLITE_DONE) { - tf_printf("tf_ssb_connections_store: %d, %s.\n", r, sqlite3_errmsg(db)); + tf_printf("tf_ssb_connections_store: %s aka %s.\n", sqlite3_errstr(r), sqlite3_errmsg(db)); } } sqlite3_finalize(statement);