osmo-bsc: Fix 'apply-config-file' CTRL command

Make 'apply-config-file' check the neighbor config, just as is done after config parsing on startup

Related: OS#5866
Change-Id: I24ae8cd7e5e0d15eab9fd04b1858072bf0bad36a
This commit is contained in:
arehbein 2023-01-21 00:19:21 +01:00
parent 484f0771cd
commit 2a24613e39
1 changed files with 9 additions and 0 deletions

View File

@ -43,6 +43,7 @@
#include <osmocom/bsc/a_reset.h>
#include <osmocom/bsc/ctrl.h>
#include <osmocom/bsc/handover_ctrl.h>
#include <osmocom/bsc/neighbor_ident.h>
static int verify_net_apply_config_file(struct ctrl_cmd *cmd, const char *value, void *_data)
{
@ -83,6 +84,14 @@ static int set_net_apply_config_file(struct ctrl_cmd *cmd, void *_data)
goto close_ret;
}
rc = neighbors_check_cfg();
if (rc) {
cmd->reply = talloc_asprintf(cmd, "Errors in neighbor configuration");
if (!cmd->reply)
cmd->reply = "OOM";
goto close_ret;
}
cmd->reply = "OK";
cmd_ret = CTRL_CMD_REPLY;
close_ret: