tbf: Add GprsMs* argument to update() and use it in reuse_tbf
Since set_ms() is caled on the new DL TBF, the old DL TBF loses the
reference to the MS object. This will lead to a segfault, when
update() is called in reuse_tbf().
This commit adds an optional GprsMs* parameter to update() and uses it
for the slot allocation.
This fixes a TbfTest crash that would otherwise occur after applying
the next commit.
Sponsored-by: On-Waves ehf
diff --git a/src/tbf.h b/src/tbf.h
index 840125a..82ade4e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -131,7 +131,7 @@
int rlcmac_diag();
- int update();
+ int update(GprsMs *ms = NULL);
void handle_timeout();
void stop_timer();
void stop_t3191();