aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-08-24 16:05:26 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-31 00:10:43 +0100
commitc8dd3b1f5876b24e085aeb4af53662bd6a58f858 (patch)
tree7cf2ad71a69bf2f6da0edcc33cce8293d0533093
parentbce25a60f4bbd798b98727e66b25bf343031f7bc (diff)
hack a delay into TCH/H act ack for testingneels/delay_tch_h_act_ack
-rw-r--r--src/common/rsl.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 6c8f5cc2..ccb4d011 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -561,6 +561,22 @@ static int rsl_tx_chan_act_ack(struct gsm_lchan *lchan)
return abis_bts_rsl_sendmsg(msg);
}
+struct osmo_timer_list xxx_timer;
+
+static void xxx_timer_cb(void *data)
+{
+ rsl_tx_chan_act_ack(data);
+}
+
+static int rsl_tx_chan_act_ack_later(struct gsm_lchan *lchan)
+{
+ xxx_timer.cb = xxx_timer_cb;
+ xxx_timer.data = lchan;
+ osmo_timer_schedule(&xxx_timer, 10, 0);
+ return 0;
+}
+
+
/* 8.4.7 sending HANDOver DETection */
int rsl_tx_hando_det(struct gsm_lchan *lchan, uint8_t *ho_delay)
{
@@ -616,6 +632,18 @@ int rsl_tx_chan_act_acknack(struct gsm_lchan *lchan, uint8_t cause)
if (cause)
return rsl_tx_chan_act_nack(lchan, cause);
+
+ static int xxx = 0;
+
+ DEBUGP(DRSL, "%s XXXXXXXXXXXXXXXXXXXXX %d %s\n",
+ gsm_lchan_name(lchan), xxx, gsm_lchant_name(lchan->type));
+
+ if (lchan->type == GSM_LCHAN_TCH_H) {
+ if (!xxx) {
+ xxx ++;
+ return rsl_tx_chan_act_ack_later(lchan);
+ }
+ }
return rsl_tx_chan_act_ack(lchan);
}