mirror of https://git.48k.eu/ogserver
rest: log failed to delete entry from table
add logging to report failure to remove entry.master
parent
b100c570a0
commit
bad351b1d7
12
src/rest.c
12
src/rest.c
|
@ -2026,6 +2026,8 @@ static int og_cmd_post_client_delete(json_t *element,
|
|||
return -1;
|
||||
}
|
||||
if (dbi_result_get_numrows_affected(result) < 1) {
|
||||
syslog(LOG_ERR, "delete did not modify any row (%s:%d)\n",
|
||||
__func__, __LINE__);
|
||||
dbi_result_free(result);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
|
@ -2828,6 +2830,8 @@ static int og_cmd_delete_image(json_t *element, struct og_msg_params *params)
|
|||
return -1;
|
||||
}
|
||||
if (dbi_result_get_numrows_affected(result) < 1) {
|
||||
syslog(LOG_ERR, "delete did not modify any row (%s:%d)\n",
|
||||
__func__, __LINE__);
|
||||
dbi_result_free(result);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
|
@ -4989,6 +4993,8 @@ static int og_cmd_post_center_delete(json_t *element,
|
|||
}
|
||||
|
||||
if (dbi_result_get_numrows_affected(result) < 1) {
|
||||
syslog(LOG_ERR, "delete did not modify any row (%s:%d)\n",
|
||||
__func__, __LINE__);
|
||||
dbi_result_free(result);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
|
@ -5631,6 +5637,8 @@ static int og_cmd_post_repository_delete(json_t *element,
|
|||
return -1;
|
||||
}
|
||||
if (dbi_result_get_numrows_affected(result) < 1) {
|
||||
syslog(LOG_ERR, "delete did not modify any row (%s:%d)\n",
|
||||
__func__, __LINE__);
|
||||
dbi_result_free(result);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
|
@ -5791,6 +5799,8 @@ static int og_cmd_post_room_delete(json_t *element,
|
|||
return -1;
|
||||
}
|
||||
if (dbi_result_get_numrows_affected(result) < 1) {
|
||||
syslog(LOG_ERR, "delete did not modify any row (%s:%d)\n",
|
||||
__func__, __LINE__);
|
||||
dbi_result_free(result);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
|
@ -6262,6 +6272,8 @@ static int og_cmd_delete_server(json_t *element,
|
|||
return -1;
|
||||
}
|
||||
if (dbi_result_get_numrows_affected(result) < 1) {
|
||||
syslog(LOG_ERR, "delete did not modify any row (%s:%d)\n",
|
||||
__func__, __LINE__);
|
||||
dbi_result_free(result);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue