Skip to content

Commit 4fbfe57

Browse files
romanmichalvasko
authored andcommitted
server config BUGFIX handle delete on conn-type
1 parent f1d2a54 commit 4fbfe57

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/server_config.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3620,7 +3620,10 @@ nc_server_config_persistent(const struct lyd_node *node, NC_OPERATION op)
36203620

36213621
assert(!strcmp(LYD_NAME(node), "persistent"));
36223622

3623-
(void) op;
3623+
/* switch to periodic, don't do anything */
3624+
if (op == NC_OP_DELETE) {
3625+
return 0;
3626+
}
36243627

36253628
/* LOCK */
36263629
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)
36443647

36453648
assert(!strcmp(LYD_NAME(node), "periodic"));
36463649

3647-
(void) op;
3650+
/* switch to persistent, don't do anything */
3651+
if (op == NC_OP_DELETE) {
3652+
return 0;
3653+
}
36483654

36493655
/* LOCK */
36503656
if (nc_server_config_get_ch_client_with_lock(node, &ch_client)) {

0 commit comments

Comments
 (0)