mesh: Clear prov capabilities structure before reading

Capabilities need to be zero'd before realtime reading fresh values,
because they are mostly bitmasks, which are set when capabilities are
detected, and never otherwise cleared.
This commit is contained in:
Brian Gix 2020-04-01 11:02:57 -07:00
parent 96c50477ba
commit 3eaf2f114d

View File

@ -165,6 +165,8 @@ static void parse_properties(struct mesh_agent *agent,
const char *key, *uri_string;
struct l_dbus_message_iter variant;
memset(&agent->caps, 0, sizeof(agent->caps));
while (l_dbus_message_iter_next_entry(properties, &key, &variant)) {
if (!strcmp(key, "Capabilities")) {
parse_prov_caps(&agent->caps, &variant);