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/sysmo_sock.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/sysmo_sock.cpp')
-rw-r--r-- | src/sysmo_sock.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/sysmo_sock.cpp b/src/sysmo_sock.cpp index d075df0..591c105 100644 --- a/src/sysmo_sock.cpp +++ b/src/sysmo_sock.cpp @@ -82,8 +82,7 @@ static void pcu_sock_close(struct pcu_sock_state *state, int lost) { struct osmo_fd *bfd = &state->conn_bfd; struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts; - struct gprs_rlcmac_tbf *tbf; - uint8_t trx, ts, tfi; + uint8_t trx, ts; LOGP(DL1IF, LOGL_NOTICE, "PCU socket has %s connection\n", (lost) ? "LOST" : "closed"); @@ -108,14 +107,7 @@ static void pcu_sock_close(struct pcu_sock_state *state, int lost) #endif for (ts = 0; ts < 8; ts++) bts->trx[trx].pdch[ts].enable = 0; - for (tfi = 0; tfi < 32; tfi++) { - tbf = bts->trx[trx].ul_tbf[tfi]; - if (tbf) - tbf_free(tbf); - tbf = bts->trx[trx].dl_tbf[tfi]; - if (tbf) - tbf_free(tbf); - } + gprs_rlcmac_tbf::free_all(&bts->trx[trx]); } gprs_bssgp_destroy_or_exit(); |