aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-05 12:22:35 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2011-08-22 19:27:49 +0200
commit40f917f3a6dc7d801192b9c8d8cb849fe54923ef (patch)
tree4d40927acd34f6f4e28465add793a6bb77b88c07 /openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
parent5c5bfc4e3cdf98101ac6cf1094649bebee01fcac (diff)
libctrl: Improve error handling if controlif setup fails
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_ctrl.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_ctrl.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
index b1e63fc28..9d03d4040 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -297,9 +297,17 @@ static int verify_net_rf_lock(struct ctrl_cmd *cmd, const char *value, void *dat
return 0;
}
-void bsc_ctrl_cmds_install()
+int bsc_ctrl_cmds_install()
{
- ctrl_cmd_install(CTRL_NODE_NET, &cmd_net_loc);
- ctrl_cmd_install(CTRL_NODE_NET, &cmd_net_rf_lock);
- ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_lock);
+ int rc;
+
+ rc = ctrl_cmd_install(CTRL_NODE_NET, &cmd_net_loc);
+ if (rc)
+ goto end;
+ rc = ctrl_cmd_install(CTRL_NODE_NET, &cmd_net_rf_lock);
+ if (rc)
+ goto end;
+ rc = ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_lock);
+end:
+ return rc;
}