cli: fix splitting of multilist property in setter

The modes VALUE_STRSPLIT_MODE_OBJLIST* and VALUE_STRSPLIT_MODE_MULTILIST* are
different. We must use the right mode.

For example, _get_fcn_match_interface_name() concatenates the interface-names
with space. So, the tokenizer of the setter must also use space as delimiter.
VALUE_STRSPLIT_MODE_MULTILIST_WITH_ESCAPE does that correctly,
VALUE_STRSPLIT_MODE_OBJLIST_WITH_ESCAPE does not.

(cherry picked from commit 758bf32640)
This commit is contained in:
Thomas Haller 2019-04-17 16:52:20 +02:00
parent c26a421479
commit 4eaff61f35

View file

@ -1893,8 +1893,8 @@ _set_fcn_multilist (ARGS_SET_FCN)
property_info->property_typ_data->subtype.multilist.strsplit_escaped_tokens
? VALUE_STRSPLIT_MODE_ESCAPED_TOKENS
: ( property_info->property_typ_data->subtype.multilist.strsplit_with_escape
? VALUE_STRSPLIT_MODE_OBJLIST_WITH_ESCAPE
: VALUE_STRSPLIT_MODE_OBJLIST),
? VALUE_STRSPLIT_MODE_MULTILIST_WITH_ESCAPE
: VALUE_STRSPLIT_MODE_MULTILIST),
&nstrv);
j = 0;