aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-12 16:44:32 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-16 16:11:16 +0100
commita60f344212855dc8c9b3efe8b6a8ccdb3045e5ee (patch)
tree0c0dcd62151f806c8fbdb57e3e86419e2873f7e0 /src
parentcbdfb78f7bf156f9df020d3a5096f591752cd981 (diff)
HO: store speech codec list from BSSMAP Assignment in conn
On BSSMAP Assignment Request received from the MSC, store the Speech Codec List in the subscr conn, so that we may evaluate available codecs during handover decision. (Will be used, e.g., by handover_decision_2.) Change-Id: I8222d73085eb777696e365c94214c05d56e6d129
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/osmo_bsc_bssap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 9bd3fe9a1..0adc001be 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -741,7 +741,6 @@ static int bssmap_handle_assignm_req(struct osmo_bsc_sccp_con *conn,
bool aoip = false;
struct sockaddr_storage rtp_addr;
struct gsm0808_channel_type ct;
- struct gsm0808_speech_codec_list scl;
struct gsm0808_speech_codec_list *scl_ptr = NULL;
int rc;
@@ -800,6 +799,7 @@ static int bssmap_handle_assignm_req(struct osmo_bsc_sccp_con *conn,
}
/* Decode speech codec list (AoIP) */
+ conn->conn->codec_list_present = false;
if (aoip) {
/* Check for speech codec list element */
if (!TLVP_PRESENT(&tp, GSM0808_IE_SPEECH_CODEC_LIST)) {
@@ -809,14 +809,16 @@ static int bssmap_handle_assignm_req(struct osmo_bsc_sccp_con *conn,
}
/* Decode Speech Codec list */
- rc = gsm0808_dec_speech_codec_list(&scl, TLVP_VAL(&tp, GSM0808_IE_SPEECH_CODEC_LIST),
+ rc = gsm0808_dec_speech_codec_list(&conn->conn->codec_list,
+ TLVP_VAL(&tp, GSM0808_IE_SPEECH_CODEC_LIST),
TLVP_LEN(&tp, GSM0808_IE_SPEECH_CODEC_LIST));
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR,
"Unable to decode speech codec list\n");
goto reject;
}
- scl_ptr = &scl;
+ conn->conn->codec_list_present = true;
+ scl_ptr = &conn->conn->codec_list;
}
/* Match codec information from the assignment command against the