diff options
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |