Skip to content

Commit

Permalink
proxy: do not require properties when autocreating container
Browse files Browse the repository at this point in the history
Setting properties when autocreating a container was not mandatory, but
there was a warning message because the properties directory was null.
  • Loading branch information
fvennetier committed Mar 26, 2021
1 parent 3a87e07 commit 3e46cb9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions proxy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,14 @@ GError * KV_read_properties (struct json_object *j, gchar ***out,
EXTRA_ASSERT(oio_str_is_set(section));

*out = NULL;
if (!json_object_is_type(j, json_type_object))
return BADREQ("Object argument expected");
if (json_object_get_type(j) == json_type_null && !fail_if_empty) {
*out = g_malloc0(sizeof(gchar*));
return NULL;
}
if (!json_object_is_type(j, json_type_object)) {
return BADREQ("Object argument expected, got %s",
json_type_to_name(json_object_get_type(j)));
}
struct json_object *jprops = NULL;

if (!json_object_object_get_ex(j, section, &jprops)) {
Expand Down

0 comments on commit 3e46cb9

Please # to comment.