From 55179decb79c7bf02662b8287efdd948cf006e94 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 7 Nov 2024 19:00:30 +0100 Subject: client: improve error reporting for image creation reponse provide a bit more information in the logs to identify the error --- src/client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/client.c') diff --git a/src/client.c b/src/client.c index 817a9c0..7e787e4 100644 --- a/src/client.c +++ b/src/client.c @@ -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; } -- cgit v1.2.3-18-g5258