diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-11-07 18:55:33 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-11-07 18:57:32 +0100 |
commit | 1fd62a4850f6e1cb16fb7c333d884660fb08d75b (patch) | |
tree | 6a727fee41866261cdb86188f091eb1d41ed661f | |
parent | e67cdafb719fc5701f5652b7af028779fc364a82 (diff) |
client: use image id in last command context
instead of using image id that client reports
-rw-r--r-- | src/client.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |