aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/handover_fsm.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-12 21:23:26 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-28 12:18:23 +0200
commitac85b34476afc341af7e09e9eca368835cd9d68b (patch)
tree742a6682f64a132d400c440fb9835a2d044cd434 /src/osmo-bsc/handover_fsm.c
parentdbb38d532b10797aa65bfd29aa5a31ce76e6b5ea (diff)
lchan_fsm: split off lchan_rtp_fsm, establish RTP a bit earlier
Diffstat (limited to 'src/osmo-bsc/handover_fsm.c')
-rw-r--r--src/osmo-bsc/handover_fsm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 0a6ee2471..ec2a53d2d 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -32,6 +32,7 @@
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/lchan_select.h>
#include <osmocom/bsc/lchan_fsm.h>
+#include <osmocom/bsc/lchan_rtp_fsm.h>
#include <osmocom/bsc/gsm_04_08_rr.h>
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/bsc_msc_data.h>
@@ -359,6 +360,7 @@ static void handover_start_intra_bsc(struct gsm_subscriber_connection *conn)
.requires_voice_stream = conn->lchan->mgw_endpoint_ci_bts ? true : false,
.msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic,
.old_lchan = conn->lchan,
+ .wait_before_switching_rtp = true,
};
lchan_activate(ho->new_lchan, &info);
@@ -843,6 +845,9 @@ static void ho_fsm_wait_rr_ho_detect(struct osmo_fsm_inst *fi, uint32_t event, v
}
}
+ if (ho->new_lchan->fi_rtp)
+ osmo_fsm_inst_dispatch(ho->new_lchan->fi_rtp,
+ LCHAN_RTP_EV_READY_TO_SWITCH_RTP, 0);
ho_fsm_state_chg(HO_ST_WAIT_RR_HO_COMPLETE);
/* The lchan FSM will already start to redirect the RTP stream */
return;
@@ -851,7 +856,9 @@ static void ho_fsm_wait_rr_ho_detect(struct osmo_fsm_inst *fi, uint32_t event, v
LOG_HO(conn, LOGL_ERROR,
"Received RR Handover Complete, but haven't even seen a Handover Detect yet;"
" Accepting handover anyway\n");
-
+ if (ho->new_lchan->fi_rtp)
+ osmo_fsm_inst_dispatch(ho->new_lchan->fi_rtp,
+ LCHAN_RTP_EV_READY_TO_SWITCH_RTP, 0);
ho_fsm_state_chg(HO_ST_WAIT_LCHAN_ESTABLISHED);
return;