The standard defining the UPnPContentDirectory allows
several properties which may have multiple values.
Among others, the "res" property of the base-class is
one of these. This is the case to allow the
opartation of mediaservers on multi-homed machines,
i.e. machines having more thant one network address.
However, the API is designed to allow only single
values. See "ContentNode::SetProperty(...)":
...
ContentProperty *prop = getProperty(name);
if (prop != NULL) {
prop->setValue(value);
return;
}
prop = new ContentProperty(name, value);
addProperty(prop);
...
The code pasted above effectivly replaces old values
with new ones, making the last value win.
Since this bug is there "by design" a fix is not that
easy: The API to get properties has to be adjusted.
The underlying datastructure ContentPropertyList
could be implemented as a map (making the name
missleading:) ), mapping one property name to
multiple value-objects. To minimize work an
alternative implementation could be imagined still
using the vector but not only returning the fist
match as can be seen
in "ContentPropertyList::getContentProperty()".
Maintainers, please comment!
Tobias