Skip to content

Commit

Permalink
interfaces-plugin: fix enabled libyang reading error
Browse files Browse the repository at this point in the history
  • Loading branch information
zinccyy committed Oct 6, 2022
1 parent 9b7e76c commit b1354f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ int interfaces_interface_ipv4_address_change_ip(void* priv, sr_session_ctx_t* se

switch (change_ctx->operation) {
case SR_OP_CREATED:
// new address
break;
case SR_OP_MODIFIED:
// should be impossible - address IP can only be created and deleted
break;
case SR_OP_DELETED:
break;
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/src/plugin/data/interfaces/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int interfaces_interface_hash_from_ly(interfaces_interface_hash_element_t** if_h
}

if (if_enabled_node) {
SRPC_SAFE_CALL_ERR(error, interfaces_interface_hash_element_set_enabled(&new_element, strcmp(lyd_get_value(if_enabled_node), "true") ? 1 : 0), error_out);
SRPC_SAFE_CALL_ERR(error, interfaces_interface_hash_element_set_enabled(&new_element, strcmp(lyd_get_value(if_enabled_node), "true") == 0 ? 1 : 0), error_out);
}

if (ipv4_enabled_node) {
Expand Down

0 comments on commit b1354f9

Please sign in to comment.