mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
Update: Do not report state=set when report XML value's value is NULL
This commit is contained in:
parent
02417a11bf
commit
d30efd5842
@ -134,7 +134,7 @@ static const struct nodeattr __attr_relative[1] = {{"relative", "iso
|
||||
static const struct nodeattr __attr_name[1] = {{"name", "CDATA", NULL, 1, NULL, {NULL}}};
|
||||
static const struct nodeattr __attr_member[1] = {{"member", "CDATA", NULL, 0, NULL, {NULL}}};
|
||||
static const struct nodeattr __attr_value[1] = {{"value", "CDATA", NULL, 0, NULL, {NULL}}};
|
||||
static const struct nodeattr __attr_state[1] = {{"state", NULL, "set", 1, NULL, {"declared", "set", "uninitialized", "missing", NULL}}};
|
||||
static const struct nodeattr __attr_state[1] = {{"state", NULL, "set", 1, NULL, {"declared", "set", "unset", "uninitialized", "missing", NULL}}};
|
||||
static const struct nodeattr __attr_href[1] = {{"href", "URI", NULL, 0, NULL, {NULL}}};
|
||||
static const struct nodeattr __attr_application[1] = {{"application", "URI", NULL, 1, NULL, {NULL}}};
|
||||
static const struct nodeattr __attr__action_type[1] = {{"type", NULL, NULL, 1, NULL, {"retry", "choice", "see-other", "authenticate", "pay", "change-protocol", "slow-down", "ask-user", "ask-admin", "bug", NULL}}};
|
||||
|
@ -27,7 +27,11 @@ void reportxml_helper_add_value(reportxml_node_t *parent, const char *type, cons
|
||||
reportxml_node_set_attribute(value, "type", type);
|
||||
if (member)
|
||||
reportxml_node_set_attribute(value, "member", member);
|
||||
reportxml_node_set_attribute(value, "value", str);
|
||||
if (str) {
|
||||
reportxml_node_set_attribute(value, "value", str);
|
||||
} else {
|
||||
reportxml_node_set_attribute(value, "state", "unset");
|
||||
}
|
||||
reportxml_node_add_child(parent, value);
|
||||
refobject_unref(value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user