diff options
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 10 |
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; } |