aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-21 11:10:15 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-28 12:29:42 +0200
commit71e55118f52002af433077251a5a7fee2017b40b (patch)
tree52cf66351dbc25752a797f9ecd799b0b598a7a8b
parent7b9f825ae8f8a39c072413820a1a0557f420499d (diff)
tbf: Remove IMSI handling from trigger_dl_ass
Currently the BTS::trigger_dl_ass() method assigns the IMSI to the MS object. This should be (and is already) done earlier where the MS object is retrieved/created. This commit removes the corresponding code along with the 'imsi' parameter from trigger_dl_ass. Sponsored-by: On-Waves ehf
-rw-r--r--src/bts.cpp11
-rw-r--r--src/bts.h2
-rw-r--r--src/tbf.cpp2
-rw-r--r--src/tbf_dl.cpp4
4 files changed, 7 insertions, 12 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 371d369..f133977 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -471,7 +471,7 @@ int BTS::rcv_rach(uint8_t ra, uint32_t Fn, int16_t qta)
/* depending on the current TBF, we assign on PACCH or AGCH */
void BTS::trigger_dl_ass(
struct gprs_rlcmac_dl_tbf *dl_tbf,
- struct gprs_rlcmac_tbf *old_tbf, const char *imsi)
+ struct gprs_rlcmac_tbf *old_tbf)
{
/* stop pending timer */
dl_tbf->stop_timer();
@@ -493,19 +493,14 @@ void BTS::trigger_dl_ass(
/* start timer */
tbf_timer_start(dl_tbf, 0, Tassign_pacch);
} else {
- LOGP(DRLCMAC, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(dl_tbf), imsi);
- if (!imsi || strlen(imsi) < 3) {
- LOGP(DRLCMAC, LOGL_ERROR, "No valid IMSI!\n");
- return;
- }
+ LOGP(DRLCMAC, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(dl_tbf), dl_tbf->imsi());
dl_tbf->was_releasing = dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE);
/* change state */
dl_tbf->set_state(GPRS_RLCMAC_ASSIGN);
dl_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH);
- dl_tbf->assign_imsi(imsi);
dl_tbf->set_new_tbf(dl_tbf);
/* send immediate assignment */
- dl_tbf->bts->snd_dl_ass(dl_tbf, 0, imsi);
+ dl_tbf->bts->snd_dl_ass(dl_tbf, 0, dl_tbf->imsi());
dl_tbf->m_wait_confirm = 1;
}
}
diff --git a/src/bts.h b/src/bts.h
index e5733e4..2e2d146 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -216,7 +216,7 @@ public:
int rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn);
int rcv_rach(uint8_t ra, uint32_t Fn, int16_t qta);
- void trigger_dl_ass(gprs_rlcmac_dl_tbf *tbf, gprs_rlcmac_tbf *old_tbf, const char *imsi);
+ void trigger_dl_ass(gprs_rlcmac_dl_tbf *tbf, gprs_rlcmac_tbf *old_tbf);
void snd_dl_ass(gprs_rlcmac_tbf *tbf, uint8_t poll, const char *imsi);
GprsMsStorage &ms_store();
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 0771969..4bafe14 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -621,7 +621,7 @@ void gprs_rlcmac_tbf::handle_timeout()
dl_tbf->update();
- dl_tbf->bts->trigger_dl_ass(dl_tbf, dl_tbf, NULL);
+ dl_tbf->bts->trigger_dl_ass(dl_tbf, dl_tbf);
} else
LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after "
"IMM.ASS confirm\n", tbf_name(dl_tbf));
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 13811fa..edaf298 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -221,7 +221,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts,
* we don't use old_downlink, so the possible uplink is used
* to trigger downlink assignment. if there is no uplink,
* AGCH is used. */
- dl_tbf->bts->trigger_dl_ass(dl_tbf, old_ul_tbf, imsi);
+ dl_tbf->bts->trigger_dl_ass(dl_tbf, old_ul_tbf);
return 0;
}
@@ -824,7 +824,7 @@ void gprs_rlcmac_dl_tbf::reuse_tbf(const uint8_t *data, const uint16_t len)
LOGP(DRLCMAC, LOGL_DEBUG, "%s Trigger dowlink assignment on PACCH, "
"because another LLC PDU has arrived in between\n",
tbf_name(this));
- bts->trigger_dl_ass(new_tbf, this, NULL);
+ bts->trigger_dl_ass(new_tbf, this);
}
bool gprs_rlcmac_dl_tbf::dl_window_stalled() const