diff --git a/src/utils/dbi.c b/src/utils/dbi.c
index b1fdaf127896aaf35863ec1a8cfd208c62982d6d..261d3b249e5265b089db34f9e4c54e64de34d017 100644 (file)
--- a/src/utils/dbi.c
+++ b/src/utils/dbi.c
sdb_dbi_strerror(client->conn));
return -1;
}
- types[i] = DBI_TYPE_TO_SC(types[i]);
+ types[i] = DBI_TYPE_TO_SDB(types[i]);
}
num_rows = dbi_result_get_numrows(res);
client->conn = dbi_conn_open(driver);
if (! client->conn) {
- sdb_log(SDB_LOG_ERR, "dbi: failed to open connection "
- "object.");
+ sdb_log(SDB_LOG_ERR, "dbi: failed to open connection object.");
return -1;
}
unsigned int type = va_arg(types, unsigned int);
- field_type = DBI_TYPE_TO_SC(field_type);
+ field_type = DBI_TYPE_TO_SDB(field_type);
/* column count starts at 1 */
if ((unsigned int)field_type != type) {
dbi_conn_close(client->conn);
client->conn = NULL;
- dbi_shutdown_r(client->inst);
+ if (client->inst)
+ dbi_shutdown_r(client->inst);
+ client->inst = NULL;
if (client->options)
sdb_dbi_options_destroy(client->options);