summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-19 18:30:49 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-09 18:34:16 +0100
commit112455ad53343041f015067aadee9dec4293ae10 (patch)
tree8bf1f496e1f48b8ae6b90fdc3d4b3c1daac93cde
parent631babe86d9c0f25af95a1b5c637432383d1f75d (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 3d83b3c..5990669 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -205,6 +205,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 0245dce..4121775 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