aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-24 20:51:06 +0200
committerIvan Kluchnikov <kluchnikovi@gmail.com>2013-10-18 15:16:42 +0400
commitd868928888e4e997498f6202fe0104ff0ee39036 (patch)
tree5a0911eab54a53c1d466dd936d375736a22caba3 /src
parentd1d114f5b73d310df26c9e39e0173f8c28368516 (diff)
tbf: Create an assign method for IMSI.
This will allow us to set flags (like IMSI) present and will be of help when fixing the tbf lookup.
Diffstat (limited to 'src')
-rw-r--r--src/tbf.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 5161e928..fc8d2299 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -36,6 +36,12 @@ static inline void tbf_update_ms_class(struct gprs_rlcmac_tbf *tbf,
tbf->ms_class = ms_class;
}
+static inline void tbf_assign_imsi(struct gprs_rlcmac_tbf *tbf,
+ const char *imsi)
+{
+ strncpy(tbf->meas.imsi, imsi, sizeof(tbf->meas.imsi) - 1);
+}
+
static struct gprs_rlcmac_tbf *tbf_lookup_dl(const uint32_t tlli, const char *imsi)
{
/* TODO: look up by IMSI first, then tlli, then old_tlli */
@@ -179,7 +185,7 @@ int tbf_handle(struct gprs_rlcmac_bts *bts,
gprs_rlcmac_trigger_downlink_assignment(tbf, old_tbf, imsi);
}
- /* store IMSI for debugging purpose */
- strncpy(tbf->meas.imsi, imsi, sizeof(tbf->meas.imsi) - 1);
+ /* store IMSI for debugging purpose. TODO: it is more than debugging */
+ tbf_assign_imsi(tbf, imsi);
return 0;
}