mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-01 20:43:47 +00:00
ipaccess: Refactor... unite some code
This commit is contained in:
@@ -92,23 +92,23 @@ static int ipacc_msg_nack(u_int8_t mt)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void check_restart_or_exit(struct gsm_bts *bts)
|
||||||
|
{
|
||||||
|
if (restart) {
|
||||||
|
abis_nm_ipaccess_restart(bts);
|
||||||
|
} else {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int ipacc_msg_ack(u_int8_t mt, struct gsm_bts *bts)
|
static int ipacc_msg_ack(u_int8_t mt, struct gsm_bts *bts)
|
||||||
{
|
{
|
||||||
if (sw_load_state == 1) {
|
if (sw_load_state == 1) {
|
||||||
fprintf(stderr, "The new software is activaed.\n");
|
fprintf(stderr, "The new software is activaed.\n");
|
||||||
|
check_restart_or_exit(bts);
|
||||||
if (restart) {
|
|
||||||
abis_nm_ipaccess_restart(bts);
|
|
||||||
} else {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
} else if (oml_state == 1) {
|
} else if (oml_state == 1) {
|
||||||
fprintf(stderr, "Set the primary OML IP.\n");
|
fprintf(stderr, "Set the primary OML IP.\n");
|
||||||
if (restart) {
|
check_restart_or_exit(bts);
|
||||||
abis_nm_ipaccess_restart(bts);
|
|
||||||
} else {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user