aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-19 10:59:58 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-19 13:38:36 +0200
commit407851b865f49ddb0ea37a1d8a26a979f08e50d8 (patch)
tree4d96c0f500f83f97292041d7cf19c20395689073 /src/bts.cpp
parent196ddc58a414bb0209e672896d1119d7297c2872 (diff)
tbf: Add BTS::ms_alloc methodjerlbeck/wip/ms-struct
Currently the code that creates the MS objects with tbf.cpp is duplicated. This commit moves the corresponding code into a new method. Since there is no TLLI available there, the GprsMsStorage::create_ms method has been refactored into two variants, one with TLLI/direction and one without. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.cpp')
-rw-r--r--src/bts.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 0ff0ffac..bc5ac945 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -522,6 +522,17 @@ void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, uint8_t poll, const char *imsi)
}
+GprsMs *BTS::ms_alloc(uint8_t ms_class)
+{
+ GprsMs *ms;
+ ms = ms_store().create_ms();
+
+ ms->set_timeout(m_bts.ms_idle_sec);
+ ms->set_ms_class(ms_class);
+
+ return ms;
+}
+
/*
* PDCH code below. TODO: move to a separate file
*/