Revert "tbf: Add GprsMs* argument to update() and use it in reuse_tbf"
This reverts commit 2272a83a13b57ea7e99fe96ac76e4ad892e19e90.
The modification is no longer needed, since the call to update has
been removed from reuse_tbf().
Conflicts:
src/tbf_dl.cpp
Sponsored-by: On-Waves ehf
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 006f66e..1d72ffc 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -263,24 +263,18 @@
talloc_free(tbf);
}
-int gprs_rlcmac_tbf::update(GprsMs *ms_)
+int gprs_rlcmac_tbf::update()
{
struct gprs_rlcmac_bts *bts_data = bts->bts_data();
- int rc = -EINVAL;
+ int rc;
LOGP(DRLCMAC, LOGL_DEBUG, "********** TBF update **********\n");
if (direction != GPRS_RLCMAC_DL_TBF)
return -EINVAL;
- if (!ms_)
- ms_ = ms();
-
- if (!ms_)
- return -EINVAL;
-
tbf_unlink_pdch(this);
- rc = bts_data->alloc_algorithm(bts_data, ms_, this, bts_data->alloc_algorithm_curst, 0);
+ rc = bts_data->alloc_algorithm(bts_data, ms(), this, bts_data->alloc_algorithm_curst, 0);
/* if no resource */
if (rc < 0) {
LOGP(DRLCMAC, LOGL_ERROR, "No resource after update???\n");
diff --git a/src/tbf.h b/src/tbf.h
index f6f13f7..7f1dd76 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -131,7 +131,7 @@
int rlcmac_diag();
- int update(GprsMs *ms = NULL);
+ int update();
void handle_timeout();
void stop_timer();
void stop_t3191();