diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client.c b/src/client.c index 67c6a2e..f2eb865 100644 --- a/src/client.c +++ b/src/client.c @@ -499,7 +499,8 @@ static int og_resp_refresh(json_t *data, struct og_client *cli) static int update_image_info(struct og_dbi *dbi, const char *image_id, const char *clonator, const char *compressor, - const char *filesystem, const uint64_t datasize) + const char *filesystem, const uint64_t datasize, + uint64_t size) { const char *msglog; dbi_result result; @@ -527,6 +528,7 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) struct og_software_legacy soft_legacy; struct og_image_legacy img_legacy; struct og_computer computer = {}; + uint64_t datasize = 0, size = 0; const char *compressor = NULL; const char *filesystem = NULL; const char *partition = NULL; @@ -537,7 +539,6 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) const char *code = NULL; const char *name = NULL; const char *repo = NULL; - uint64_t datasize = 0; struct og_dbi *dbi; const char *key; json_t *value; @@ -570,6 +571,8 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) err = og_json_parse_string(value, &filesystem); else if (!strcmp(key, "datasize")) err = og_json_parse_uint64(value, &datasize); + else if (!strcmp(key, "size")) + err = og_json_parse_uint64(value, &size); if (err < 0) return err; @@ -633,7 +636,7 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) } res = update_image_info(dbi, image_id, clonator, compressor, - filesystem, datasize); + filesystem, datasize, size); og_dbi_close(dbi); if (res) { |