summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest.c b/src/rest.c
index 708d53a..6ccb97b 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -3737,17 +3737,17 @@ static int og_cmd_add_image(json_t *element, struct og_msg_params *params,
snprintf(new_image_id, sizeof(new_image_id), "%lu", params->image.id);
params->id = new_image_id;
- json_object_set_new(element, "id", json_string(params->id));
} else {
syslog(LOG_INFO, "updating existing image `%s'\n", params->image.name);
snprintf(new_image_id, sizeof(new_image_id), "%lu", params->image.id);
params->id = new_image_id;
}
+ json_object_set_new(element, "id", json_string(params->id));
clients = json_copy(element);
json_object_del(clients, "clients");
- err = og_dbi_get_repository_ip(dbi, atoll(params->id), repository_ip);
+ err = og_dbi_get_repository_ip(dbi, params->image.repo_id, repository_ip);
og_dbi_close(dbi);
if (err < 0)
return err;