oml: In case we get a NACK, drop the OML connection and hope for the best
Assume that a NACK is a onetime failure and that on the next attempt it will work better. If that is not the case we might even send a reboot to the BTS.
This commit is contained in:
parent
c7a1a1fd2e
commit
39e6ba09c2
|
@ -33,6 +33,7 @@
|
||||||
#include <openbsc/signal.h>
|
#include <openbsc/signal.h>
|
||||||
#include <openbsc/chan_alloc.h>
|
#include <openbsc/chan_alloc.h>
|
||||||
#include <osmocore/talloc.h>
|
#include <osmocore/talloc.h>
|
||||||
|
#include <openbsc/ipaccess.h>
|
||||||
|
|
||||||
/* global pointer to the gsm network data structure */
|
/* global pointer to the gsm network data structure */
|
||||||
extern struct gsm_network *bsc_gsmnet;
|
extern struct gsm_network *bsc_gsmnet;
|
||||||
|
@ -565,10 +566,20 @@ static int sw_activ_rep(struct msgb *mb)
|
||||||
/* Callback function for NACK on the OML NM */
|
/* Callback function for NACK on the OML NM */
|
||||||
static int oml_msg_nack(struct nm_nack_signal_data *nack)
|
static int oml_msg_nack(struct nm_nack_signal_data *nack)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (nack->mt == NM_MT_SET_BTS_ATTR_NACK) {
|
if (nack->mt == NM_MT_SET_BTS_ATTR_NACK) {
|
||||||
|
|
||||||
LOGP(DNM, LOGL_FATAL, "Failed to set BTS attributes. That is fatal. "
|
LOGP(DNM, LOGL_FATAL, "Failed to set BTS attributes. That is fatal. "
|
||||||
"Was the bts type and frequency properly specified?\n");
|
"Was the bts type and frequency properly specified?\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
} else {
|
||||||
|
LOGP(DNM, LOGL_ERROR, "Got a NACK going to drop the OML links.\n");
|
||||||
|
for (i = 0; i < bsc_gsmnet->num_bts; ++i) {
|
||||||
|
struct gsm_bts *bts = gsm_bts_num(bsc_gsmnet, i);
|
||||||
|
if (is_ipaccess_bts(bts))
|
||||||
|
ipaccess_drop_oml(bts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue