Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,16 @@ nc_read_msg_poll_io(struct nc_session *session, int io_timeout, struct ly_in **m

/* read msg */
ret = nc_read_msg_io(session, io_timeout, 1, &buf, &buf_len);
if (ret > 0) {
ret = 1;
}

/* SESSION IO UNLOCK */
nc_session_io_unlock(session, __func__);

if (ret > 0) {
ret = 1;
} else {
return ret;
}

/* create input */
if (ly_in_new_memory(buf, msg)) {
free(buf);
Expand Down
6 changes: 6 additions & 0 deletions src/server_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -4303,6 +4303,7 @@ nc_server_config_listen_all_endpoints(const struct lyd_node *node)
struct lyd_node *n, *iter;
struct nc_endpt *endpt;
struct nc_bind *bind;
struct lyd_meta *m;

NC_CHECK_ERR_RET(strcmp(LYD_NAME(node), "netconf-server"),
ERR(NULL, "Unexpected node \"%s\" encountered, expected \"netconf-server\".", LYD_NAME(node)), 1);
Expand All @@ -4314,6 +4315,11 @@ nc_server_config_listen_all_endpoints(const struct lyd_node *node)
if (n) {
/* go over all the endpoints */
LY_LIST_FOR(lyd_child(n), iter) {
if ((m = lyd_find_meta(iter->meta, NULL, "yang:operation"))) {
if (!strcmp(lyd_get_meta_value(m), "delete")) {
continue;
}
}
/* get the endpoint and bind structs from the node */
NC_CHECK_RET(nc_server_config_get_endpt(iter, &endpt, &bind));

Expand Down