client: improve error reporting for image creation reponse

provide a bit more information in the logs to identify the error
master v1.2.5-25
OpenGnSys Support Team 2024-11-07 19:00:30 +01:00
parent 1fd62a4850
commit 55179decb7
1 changed files with 6 additions and 3 deletions

View File

@ -1120,14 +1120,16 @@ static int og_resp_image_create(json_t *data, struct og_client *cli)
soft_legacy.center);
if (!res) {
og_dbi_close(dbi);
syslog(LOG_ERR, "Problem updating client configuration\n");
syslog(LOG_ERR, "Problem updating software inventory (%s:%u)\n",
__FILE__, __LINE__);
return -1;
}
res = og_dbi_update_image(dbi, &img_legacy, soft_legacy.id);
if (!res) {
og_dbi_close(dbi);
syslog(LOG_ERR, "Problem updating client configuration\n");
syslog(LOG_ERR, "Problem updating image (%s:%u)\n",
__FILE__, __LINE__);
return -1;
}
@ -1137,7 +1139,8 @@ static int og_resp_image_create(json_t *data, struct og_client *cli)
og_dbi_close(dbi);
if (res) {
syslog(LOG_ERR, "Problem updating image info\n");
syslog(LOG_ERR, "Problem updating image (%s:%u)\n",
__FILE__, __LINE__);
return -1;
}