From 4fbfe57aa3924befc7d3db91a97b186711981347 Mon Sep 17 00:00:00 2001 From: roman Date: Thu, 22 Aug 2024 16:18:12 +0200 Subject: [PATCH] server config BUGFIX handle delete on conn-type --- src/server_config.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server_config.c b/src/server_config.c index fa5d08a8..669d3d57 100644 --- a/src/server_config.c +++ b/src/server_config.c @@ -3620,7 +3620,10 @@ nc_server_config_persistent(const struct lyd_node *node, NC_OPERATION op) assert(!strcmp(LYD_NAME(node), "persistent")); - (void) op; + /* switch to periodic, don't do anything */ + if (op == NC_OP_DELETE) { + return 0; + } /* LOCK */ if (nc_server_config_get_ch_client_with_lock(node, &ch_client)) { @@ -3644,7 +3647,10 @@ nc_server_config_periodic(const struct lyd_node *node, NC_OPERATION op) assert(!strcmp(LYD_NAME(node), "periodic")); - (void) op; + /* switch to persistent, don't do anything */ + if (op == NC_OP_DELETE) { + return 0; + } /* LOCK */ if (nc_server_config_get_ch_client_with_lock(node, &ch_client)) {