Skip to content

Commit 6512508

Browse files
committed
server config BUGFIX deL_enpd func not exclusive to SSH nor TLS
1 parent 3bb5696 commit 6512508

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/server_config_util.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,18 @@ nc_server_config_check_delete(struct lyd_node **tree, const char *path_fmt, ...)
204204
return ret;
205205
}
206206

207+
API int
208+
nc_server_config_del_endpt(const char *endpt_name, struct lyd_node **config)
209+
{
210+
NC_CHECK_ARG_RET(NULL, config, 1);
211+
212+
if (endpt_name) {
213+
return nc_server_config_delete(config, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint[name='%s']", endpt_name);
214+
} else {
215+
return nc_server_config_delete(config, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint");
216+
}
217+
}
218+
207219
API int
208220
nc_server_config_add_unix_socket(const struct ly_ctx *ctx, const char *endpt_name, const char *path,
209221
const char *mode, const char *owner, const char *group, struct lyd_node **config)
@@ -1047,18 +1059,6 @@ nc_server_config_add_ch_address_port(const struct ly_ctx *ctx, const char *clien
10471059
return ret;
10481060
}
10491061

1050-
API int
1051-
nc_server_config_del_endpt(const char *endpt_name, struct lyd_node **config)
1052-
{
1053-
NC_CHECK_ARG_RET(NULL, config, 1);
1054-
1055-
if (endpt_name) {
1056-
return nc_server_config_delete(config, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint[name='%s']", endpt_name);
1057-
} else {
1058-
return nc_server_config_delete(config, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint");
1059-
}
1060-
}
1061-
10621062
API int
10631063
nc_server_config_del_ch_client(const char *ch_client_name, struct lyd_node **config)
10641064
{

0 commit comments

Comments
 (0)