diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-06-18 19:59:48 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-06-23 14:55:55 +0200 |
commit | ab7f409bffd0b95c86d874797366a77f20538a30 (patch) | |
tree | cc9fdedfc29dc4b27a2fe3ddcae841959c2a2af8 /src | |
parent | a6386ea64d5be35aea8fe9331270a9ef146984e5 (diff) |
bts-virtual: Implement bts_model_trx_close
Change-Id: Id37562652b1ebc27d808d83342e4961b936dbcad
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-virtual/bts_model.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/osmo-bts-virtual/bts_model.c b/src/osmo-bts-virtual/bts_model.c index 8db0201a..8209ce21 100644 --- a/src/osmo-bts-virtual/bts_model.c +++ b/src/osmo-bts-virtual/bts_model.c @@ -35,6 +35,8 @@ #include <osmo-bts/handover.h> #include <osmo-bts/l1sap.h> +#include "virtual_um.h" + /* TODO: check if dummy method is sufficient, else implement */ int bts_model_lchan_deactivate(struct gsm_lchan *lchan) { @@ -52,7 +54,14 @@ int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, void bts_model_trx_close(struct gsm_bts_trx *trx) { - LOGP(DL1C, LOGL_NOTICE, "Unimplemented %s\n", __func__); + struct phy_instance *pinst = trx_phy_instance(trx); + struct phy_link *plink = pinst->phy_link; + + if (phy_link_state_get(plink) != PHY_LINK_SHUTDOWN) { + virt_um_destroy(plink->u.virt.virt_um); + plink->u.virt.virt_um = NULL; + phy_link_state_set(plink, PHY_LINK_SHUTDOWN); + } bts_model_trx_close_cb(trx, 0); } |