diff options
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
-rw-r--r-- | openbsc/src/libbsc/handover_logic.c | 4 | ||||
-rw-r--r-- | openbsc/src/libcommon/gsm_subscriber_base.c | 1 | ||||
-rw-r--r-- | openbsc/src/libmsc/gsm_subscriber.c | 17 |
5 files changed, 23 insertions, 3 deletions
diff --git a/debian/control b/debian/control index ad0cc89da..fcd15975d 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: openbsc Section: net Priority: optional Maintainer: Harald Welte <laforge@gnumonks.org> -Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libgtp0-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, dh-autoreconf, libosmo-abis-dev, libosmo-netif-dev, libdbd-sqlite3, libpcap-dev +Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libgtp0-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, dh-autoreconf, libosmo-abis-dev, libosmo-netif-dev, libdbd-sqlite3, libpcap-dev, libsmpp34-dev Standards-Version: 3.8.4 Homepage: http://openbsc.osmocom.org/ Vcs-Git: git://bs11-abis.gnumonks.org/openbsc.git diff --git a/debian/rules b/debian/rules index 14e8cecc1..8047b7942 100755 --- a/debian/rules +++ b/debian/rules @@ -37,5 +37,5 @@ override_dh_strip: override_dh_auto_configure: echo $(VERSION) > openbsc/.tarball-version - dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc + dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc --enable-smpp diff --git a/openbsc/src/libbsc/handover_logic.c b/openbsc/src/libbsc/handover_logic.c index ff6e99346..d04b3d6ea 100644 --- a/openbsc/src/libbsc/handover_logic.c +++ b/openbsc/src/libbsc/handover_logic.c @@ -100,6 +100,10 @@ int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts) if (bsc_ho_by_old_lchan(old_lchan)) return -EBUSY; + /* Don't do handover of a already closed channel */ + if (!old_lchan->conn->subscr) + return -EBUSY; + DEBUGP(DHO, "(old_lchan on BTS %u, new BTS %u)\n", old_lchan->ts->trx->bts->nr, bts->nr); diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index a455824a3..55bae603c 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -68,6 +68,7 @@ struct gsm_subscriber *subscr_alloc(void) static void subscr_free(struct gsm_subscriber *subscr) { + OSMO_ASSERT(!subscr->is_paging); llist_del(&subscr->entry); talloc_free(subscr); } diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 57c10cf7e..ccba360b0 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -33,6 +33,7 @@ #include <openbsc/gsm_subscriber.h> #include <openbsc/gsm_04_08.h> +#include <openbsc/osmo_msc.h> #include <openbsc/debug.h> #include <openbsc/paging.h> #include <openbsc/signal.h> @@ -82,7 +83,21 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, struct gsm_subscriber *subscr = param; struct paging_signal_data sig_data; - OSMO_ASSERT(subscr->is_paging); + /* + * We might receive a timeout or paging response after one + * of the systems has already stopped paging and the below + * code was executed. In this case just leave early and free + * the resources early. + * This doesn't need a subscr_put as this should have been + * executed when is_paging has been set to 0. + */ + if (!subscr->is_paging) { + LOGP(DMM, LOGL_NOTICE, "Unexpected pagign event(%d,%d) for %s\n", + hooknum, event, subscr_name(subscr)); + if (conn) + msc_release_connection(conn); + return 0; + } /* * Stop paging on all other BTS. E.g. if this is |