aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-05-04 16:59:10 +0200
committerlaforge <laforge@osmocom.org>2023-07-21 11:15:27 +0000
commit87a6e6b6519b10ea9b7d4f4d7f168198f3de907a (patch)
tree20fda44265cd46df25e020d1b6f28f80145ebdec /src
parentb18cae19524749e048546938e0182ab5f8b337e5 (diff)
ASCI: Prepare bssmap_handle_ass_req_ct_speech() for VGCS/VBS
bssmap_handle_ass_req_ct_speech() calls select_codecs(), which requires a bts pointer. An extra bts pointer is added to both function and used instead of deiving it from the conn->lchan pointer. This funcion can then be called if no channel is assigned (yet). (conn->lchan is NULL) This function will be used by the VGCS/VBS call control also. (Chg-Id: Id9e94fb4f27bb438b7093c031344a3400bfa34f1) Change-Id: Ifc1e315d5282f01f8d1bd600d62476c2ae74eca9 Related: OS#4852
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/osmo_bsc_bssap.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index bef33548c..096a8353d 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -742,11 +742,10 @@ static int select_data_rates(struct assignment_request *req, struct gsm0808_chan
* find an alternate setting here, this one will be tried secondly if our
* primary choice fails. */
static int select_codecs(struct assignment_request *req, const struct gsm0808_channel_type *ct,
- struct gsm_subscriber_connection *conn)
+ struct gsm_subscriber_connection *conn, struct gsm_bts *bts)
{
int rc, i, nc = 0;
struct bsc_msc_data *msc;
- struct gsm_bts *bts = conn_get_bts(conn);
if (!bts) {
LOGP(DMSC, LOGL_ERROR, "No lchan, cannot select codecs\n");
@@ -1023,9 +1022,9 @@ static int bssmap_handle_ass_req_ct_data(struct gsm_subscriber_connection *conn,
return 0;
}
-static int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *conn, struct tlv_parsed *tp,
- struct gsm0808_channel_type *ct, struct assignment_request *req,
- uint8_t *cause)
+int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *conn, struct gsm_bts *bts,
+ struct tlv_parsed *tp, struct gsm0808_channel_type *ct,
+ struct assignment_request *req, uint8_t *cause)
{
bool aoip = gscon_is_aoip(conn);
int rc;
@@ -1049,7 +1048,7 @@ static int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *con
/* Match codec information from the assignment command against the
* local preferences of the BSC and BTS */
- rc = select_codecs(req, ct, conn);
+ rc = select_codecs(req, ct, conn, bts);
if (rc < 0) {
*cause = GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL;
return -1;
@@ -1129,7 +1128,7 @@ static int bssmap_handle_assignm_req(struct gsm_subscriber_connection *conn,
goto reject;
break;
case GSM0808_CHAN_SPEECH:
- if (bssmap_handle_ass_req_ct_speech(conn, &tp, &ct, &req, &cause) < 0)
+ if (bssmap_handle_ass_req_ct_speech(conn, conn_get_bts(conn), &tp, &ct, &req, &cause) < 0)
goto reject;
break;
case GSM0808_CHAN_SIGN: