summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-19 18:30:49 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-11-12 16:06:46 +0100
commit9e4957801f20a963fd01a1ec7ae134944c215bd3 (patch)
tree2e76caf4f9856cda5f8030fba0c2d6c7a74b0d5a
parent5903193d88e72834fb121f88f17385c91a1dbf2b (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 922a6c6..b161de3 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 585927c..c2e679a 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