summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte2010-12-23 17:05:20 +0100
committerAndreas Eversberg2011-02-20 11:33:40 +0100
commit0af1aa359f134b8a15b2a04670788eda4885f88e (patch)
tree8571b711c0baef4e9d51644975d0777c3f8f1ebf
parentMNCC: Re-connect to the MNCC socket if connection was lost (diff)
downloadlcr-0af1aa359f134b8a15b2a04670788eda4885f88e.tar.gz
lcr-0af1aa359f134b8a15b2a04670788eda4885f88e.tar.xz
lcr-0af1aa359f134b8a15b2a04670788eda4885f88e.zip
MNCC: refuse any incoming SETUP if there is no MNCC connection
-rw-r--r--gsm_bs.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/gsm_bs.cpp b/gsm_bs.cpp
index 259e8a9..3fc9a88 100644
--- a/gsm_bs.cpp
+++ b/gsm_bs.cpp
@@ -563,6 +563,20 @@ void Pgsm_bs::message_setup(unsigned int epoint_id, int message_id, union parame
memcpy(&p_capainfo, &param->setup.capainfo, sizeof(p_capainfo));
memcpy(&p_redirinfo, &param->setup.redirinfo, sizeof(p_redirinfo));
+ /* no GSM MNCC connection */
+ if (gsm->mncc_lfd.fd < 0) {
+ gsm_trace_header(p_m_mISDNport, this, MNCC_SETUP_REQ, DIRECTION_OUT);
+ add_trace("failure", NULL, "No MNCC connection.");
+ end_trace();
+ message = message_create(p_serial, epoint_id, PORT_TO_EPOINT, MESSAGE_RELEASE);
+ message->param.disconnectinfo.cause = 27; // temp. unavail.
+ message->param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
+ message_put(message);
+ new_state(PORT_STATE_RELEASE);
+ trigger_work(&p_m_g_delete);
+ return;
+ }
+
/* no number */
if (!p_dialinginfo.id[0]) {
gsm_trace_header(p_m_mISDNport, this, MNCC_SETUP_REQ, DIRECTION_OUT);