aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-07-17 00:32:07 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-07-25 15:22:06 +0000
commitc57304b65e0789167f992ffc9b4037c871569880 (patch)
tree54a6fcdf14de9a885c1f5f02f5b141037c047a99
parent9ab51522dacb56db832340d66f22f2e3c59e89c7 (diff)
dyn PDCH: code dup: use conf_lchans_as_pchan()
For ip.access dyn PDCH, call conf_lchans_as_pchan() instead of dup'ing the pchan-to-lchan switch. Change-Id: I979828e08953e83ae579a347334536f52939faf0
-rw-r--r--src/common/rsl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 10b95ae..aac520c 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1784,19 +1784,23 @@ static void ipacc_dyn_pdch_ts_disconnected(struct gsm_bts_trx_ts *ts)
LOGP(DRSL, LOGL_DEBUG,
"%s PDCH DEACT operation: channel disconnected, will reconnect as TCH\n",
gsm_lchan_name(ts->lchan));
- ts->lchan[0].type = GSM_LCHAN_TCH_F;
as_pchan = GSM_PCHAN_TCH_F;
} else if (ts->flags & TS_F_PDCH_ACT_PENDING) {
LOGP(DRSL, LOGL_DEBUG,
"%s PDCH ACT operation: channel disconnected, will reconnect as PDTCH\n",
gsm_lchan_name(ts->lchan));
- ts->lchan[0].type = GSM_LCHAN_PDTCH;
as_pchan = GSM_PCHAN_PDCH;
} else
/* No reconnect pending. */
return;
+ rc = conf_lchans_as_pchan(ts, as_pchan);
+ if (rc)
+ goto error_nack;
+
rc = bts_model_ts_connect(ts, as_pchan);
+
+error_nack:
/* Error? then NACK right now. */
if (rc)
ipacc_dyn_pdch_complete(ts, rc);