From ac85b34476afc341af7e09e9eca368835cd9d68b Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 12 Jul 2018 21:23:26 +0200 Subject: lchan_fsm: split off lchan_rtp_fsm, establish RTP a bit earlier Change-Id: Id7a4407d9b63be05ce63f5f2768b7d7e3d5c86fb --- src/osmo-bsc/handover_fsm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/osmo-bsc/handover_fsm.c') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3