From 1fd62a4850f6e1cb16fb7c333d884660fb08d75b Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 7 Nov 2024 18:55:33 +0100 Subject: client: use image id in last command context instead of using image id that client reports --- src/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client.c b/src/client.c index 3422ad0..817a9c0 100644 --- a/src/client.c +++ b/src/client.c @@ -1103,8 +1103,8 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) computer.center); snprintf(soft_legacy.software, sizeof(soft_legacy.software), "%s", software); - snprintf(img_legacy.image_id, sizeof(img_legacy.image_id), "%s", - image_id); + snprintf(img_legacy.image_id, sizeof(img_legacy.image_id), "%u", + cli->last_cmd.ctx.image.id); snprintf(soft_legacy.id, sizeof(soft_legacy.id), "%d", computer.id); snprintf(img_legacy.part, sizeof(img_legacy.part), "%s", partition); snprintf(img_legacy.disk, sizeof(img_legacy.disk), "%s", disk); @@ -1131,7 +1131,7 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) return -1; } - res = update_image_info(dbi, image_id, clonator, compressor, + res = update_image_info(dbi, img_legacy.image_id, clonator, compressor, filesystem, datasize, size, lastupdate, perms, checksum); og_dbi_close(dbi); -- cgit v1.2.3-18-g5258