version 1.121, 2019/03/16 17:14:07 |
version 1.122, 2019/03/18 11:58:40 |
|
|
parent = options_get(oo, name); |
parent = options_get(oo, name); |
|
|
/* Check that array options and indexes match up. */ |
/* Check that array options and indexes match up. */ |
if (idx != -1) { |
if (idx != -1 && (*name == '@' || !options_isarray(parent))) { |
if (*name == '@' || options_array_size(parent, NULL) == -1) { |
cmdq_error(item, "not an array: %s", argument); |
cmdq_error(item, "not an array: %s", argument); |
goto fail; |
goto fail; |
|
} |
|
} |
} |
|
|
/* With -o, check this option is not already set. */ |
/* With -o, check this option is not already set. */ |
|
|
goto fail; |
goto fail; |
} |
} |
options_set_string(oo, name, append, "%s", value); |
options_set_string(oo, name, append, "%s", value); |
} else if (idx == -1 && options_array_size(parent, NULL) == -1) { |
} else if (idx == -1 && !options_isarray(parent)) { |
error = cmd_set_option_set(self, item, oo, parent, value); |
error = cmd_set_option_set(self, item, oo, parent, value); |
if (error != 0) |
if (error != 0) |
goto fail; |
goto fail; |