summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-19 18:30:49 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-23 22:27:38 +0100
commitc01776257382a692a6f19f9ccb82501db29f6057 (patch)
treeef40df3a1c93b487ce565dcb4d1be655aa49acd0
parent559ecb899a46829ee2df37166ddf5748a1e8df45 (diff)
IuCS: store assigned rab_id in gsm_subscriber_connection
-rw-r--r--openbsc/include/openbsc/gsm_data.h1
-rw-r--r--openbsc/src/libmsc/msc_ifaces.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 781e779d3..9fe0dc757 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -173,6 +173,7 @@ struct gsm_subscriber_connection {
unsigned int mgcp_rtp_endpoint;
uint16_t mgcp_rtp_port_ue;
uint16_t mgcp_rtp_port_cn;
+ uint8_t rab_id;
} iu;
};
diff --git a/openbsc/src/libmsc/msc_ifaces.c b/openbsc/src/libmsc/msc_ifaces.c
index 585927c73..c2e679ae7 100644
--- a/openbsc/src/libmsc/msc_ifaces.c
+++ b/openbsc/src/libmsc/msc_ifaces.c
@@ -134,6 +134,7 @@ static int conn_iu_rab_act_cs(struct gsm_trans *trans)
/* HACK. where to scope the RAB Id? At the conn / subscriber /
* ue_conn_ctx? */
static uint8_t next_rab_id = 1;
+ conn->iu.rab_id = next_rab_id ++;
conn->iu.mgcp_rtp_endpoint =
mgcpgw_client_next_endpoint(conn->network->mgcpgw.client);
@@ -152,9 +153,9 @@ static int conn_iu_rab_act_cs(struct gsm_trans *trans)
uint32_t rtp_ip =
mgcpgw_client_remote_addr_n(conn->network->mgcpgw.client);
- return iu_rab_act_cs(uectx, next_rab_id++, rtp_ip, conn->iu.mgcp_rtp_port_ue, 1);
+ return iu_rab_act_cs(uectx, conn->iu.rab_id, rtp_ip,
+ conn->iu.mgcp_rtp_port_ue, 1);
/* use_x213_nsap == 0 for ip.access nano3G */
- /* TODO: store the RAB Id? At the conn / subscriber / ue_conn_ctx? */
}
#endif