diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-12-07 14:47:34 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-12-10 14:20:59 +0100 |
commit | 212c0c9bdaf1166e3bcbab85f3ab31dc17162f5b (patch) | |
tree | 4ad74a043d97419657a49d464538fa9c7199bad0 /src/libmsc/osmo_msc.c | |
parent | 4e0dd536b4e6634eb9d54c76f478766a90c21b4c (diff) |
move ASS-COMPL MGCP handling out of a_iface_bssap.c
BSSMAP Assignment Complete: sort MGCP handling upon Assignment Complete to the
proper locations. a_iface_bssap.c is not the right place to invoke the MGCP
related procedures.
- in a_iface_bssap.c only decode the IEs.
- call ran_conn_assign_compl() and pass decoded values.
- drop msc_assign_compl(), it was dead code; instead:
- add ran_conn_assign_compl()
- pass on all MGCP related info to msc_mgcp_ass_complete()
- move all MGCP ctx related handling from a_iface_bssap.c to msc_mgcp.c.
I'm dropping some comments to save some time, because if I adjust them IMHO
they would still anyway restate the obvious.
ran_conn_assign_compl() is now quite a thin shim, but it makes sense to have
it:
- This is the place that should tear down the ran_conn in case assignment
failed, left for a future patch.
- In the light of upcoming inter-MSC handover, ran_conn_assign_compl() will be
the place where the Assignment Complete message might be relayed to a remote
MSC.
Change-Id: I8137215c443239bddf3e69b5715839a365b73b6c
Diffstat (limited to 'src/libmsc/osmo_msc.c')
-rw-r--r-- | src/libmsc/osmo_msc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index 37c1d15a4..8cc5ee772 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -28,6 +28,7 @@ #include <osmocom/msc/a_iface.h> #include <osmocom/msc/gsm_04_08.h> #include <osmocom/msc/gsm_04_11.h> +#include <osmocom/msc/msc_mgcp.h> #include "../../bscconfig.h" #ifdef BUILD_IU @@ -113,17 +114,18 @@ void ran_conn_dtap(struct ran_conn *conn, struct msgb *msg) } /* Receive an ASSIGNMENT COMPLETE from BSC */ -void msc_assign_compl(struct ran_conn *conn, - uint8_t rr_cause, uint8_t chosen_channel, - uint8_t encr_alg_id, uint8_t speec) +void ran_conn_assign_compl(struct ran_conn *conn, const struct gsm0808_speech_codec *speech_codec_chosen, + const struct sockaddr_storage *aoip_transport_addr) { - LOGP(DRR, LOGL_DEBUG, "MSC assign complete (do nothing).\n"); + msc_mgcp_ass_complete(conn, speech_codec_chosen, aoip_transport_addr); + /* FIXME: tear down conn upon failure */ } /* Receive an ASSIGNMENT FAILURE from BSC */ void ran_conn_assign_fail(struct ran_conn *conn, uint8_t cause, uint8_t *rr_cause) { LOGP(DRR, LOGL_DEBUG, "MSC assign failure (do nothing).\n"); + /* FIXME: tear down conn upon failure */ } /* Receive a CLASSMARK CHANGE from BSC */ |