aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-13 13:33:12 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-20 11:36:12 +0200
commite43460b50fc152026ab96b5095b94fbac6939ab2 (patch)
treebe82e5062fa68f19a4bd660394a77104728e5560 /src/bts.h
parent536708617505a017b6b263a32f592471913ec464 (diff)
ms: Integrate the MS storage
Use the MS storage to find a MS object for a given TLLI instead of searching the TBF lists. The TBFs are then taken from the MS object, if one has been found. If all TBF might be temporarily detached from the MS object, a GprsMs::Guard is added to prevent the deletion of the object, in case another TBF gets attached later on in the scope. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.h')
-rw-r--r--src/bts.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bts.h b/src/bts.h
index 12778461..cdf5ec3a 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -32,6 +32,7 @@ extern "C" {
#include "sba.h"
#include "ta.h"
#include "tbf.h"
+#include "gprs_ms_storage.h"
#endif
#include <stdint.h>
@@ -220,6 +221,9 @@ public:
void trigger_dl_ass(gprs_rlcmac_dl_tbf *tbf, gprs_rlcmac_tbf *old_tbf, const char *imsi);
void snd_dl_ass(gprs_rlcmac_tbf *tbf, uint8_t poll, const char *imsi);
+ GprsMsStorage &ms_store();
+ GprsMs *ms_by_tlli(uint32_t tlli, uint32_t old_tlli = 0);
+
/*
* Statistics
*/
@@ -257,6 +261,8 @@ private:
gprs_rlcmac_tbf *tbf_by_tlli(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir);
gprs_rlcmac_tbf *tbf_by_tfi(uint8_t tfi, uint8_t trx, enum gprs_rlcmac_tbf_direction dir);
+ GprsMsStorage m_ms_store;
+
private:
/* disable copying to avoid slicing */
BTS(const BTS&);
@@ -278,6 +284,16 @@ inline SBAController *BTS::sba()
return &m_sba;
}
+inline GprsMsStorage &BTS::ms_store()
+{
+ return m_ms_store;
+}
+
+inline GprsMs *BTS::ms_by_tlli(uint32_t tlli, uint32_t old_tlli)
+{
+ return ms_store().get_ms(tlli, old_tlli);
+}
+
inline BTS *gprs_rlcmac_pdch::bts() const
{
return trx->bts;