diff options
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 9bdc1f78..ddc3b91f 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -209,14 +209,17 @@ static void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf) { int ts; - if (tbf->direction == GPRS_RLCMAC_UL_TBF) { + if (tbf->direction == GPRS_RLCMAC_UL_TBF) tbf->trx->ul_tbf[tbf->tfi()] = NULL; - for (ts = 0; ts < 8; ts++) - tbf->pdch[ts] = NULL; - } else { + else tbf->trx->dl_tbf[tbf->tfi()] = NULL; - for (ts = 0; ts < 8; ts++) - tbf->pdch[ts] = NULL; + + for (ts = 0; ts < 8; ts++) { + if (!tbf->pdch[ts]) + continue; + + tbf->pdch[ts]->detach_tbf(tbf); + tbf->pdch[ts] = NULL; } } |