Skip to content

Commit

Permalink
lease: fixed to also read state from lease file
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomaschewski committed Jun 28, 2017
1 parent 6423631 commit 3e6e484
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/leasefile.c
Expand Up @@ -631,6 +631,10 @@ __ni_addrconf_lease_info_from_xml(ni_addrconf_lease_t *lease, const xml_node_t *
if (ni_uuid_parse(&lease->uuid, child->cdata) != 0)
return -1;
} else
if (ni_string_eq(child->name, "state")) {
if ((lease->state = ni_addrconf_name_to_state(child->cdata)) < 0)
lease->state = NI_ADDRCONF_STATE_NONE;
} else
if (ni_string_eq(child->name, "update")) {
if (ni_parse_uint(child->cdata, &lease->update, 16) != 0)
return -1;
Expand Down

0 comments on commit 3e6e484

Please sign in to comment.