diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-16 17:53:23 +0200 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2013-10-28 12:52:15 +0400 |
commit | 964ddb6aa0e5d5875728c657b6bcf51a71788fc7 (patch) | |
tree | 40ea7437971296b7a22c0e6ef2602402bfe9ed4e /src/tbf.cpp | |
parent | 9e21d84f1ecde655cda32cf077dbf1a91b395e94 (diff) |
tbf: Move the code to close all timeslots into the tbf class
Move the code out of the sysmocom_socket (as this is only required
to talk to our hardware) and into the TBF class that actually knows
what a TBF is.
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 79f1ea82..8aff4633 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -237,3 +237,17 @@ struct gprs_rlcmac_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, return tbf; } + +void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_trx *trx) +{ + for (uint8_t tfi = 0; tfi < 32; tfi++) { + struct gprs_rlcmac_tbf *tbf; + + tbf = trx->ul_tbf[tfi]; + if (tbf) + tbf_free(tbf); + tbf = trx->dl_tbf[tfi]; + if (tbf) + tbf_free(tbf); + } +} |