diff options
-rw-r--r-- | include/osmocom/msc/call_leg.h | 7 | ||||
-rw-r--r-- | include/osmocom/msc/msc_roles.h | 1 | ||||
-rw-r--r-- | src/libmsc/call_leg.c | 8 | ||||
-rw-r--r-- | src/libmsc/msc_a.c | 23 | ||||
-rw-r--r-- | src/libmsc/msc_i.c | 1 | ||||
-rw-r--r-- | src/libmsc/msc_t.c | 13 |
6 files changed, 8 insertions, 45 deletions
diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index b8126e82d..61107ee2a 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -36,7 +36,6 @@ struct call_leg { uint32_t parent_event_rtp_addr_available; uint32_t parent_event_rtp_complete; - uint32_t parent_event_rtp_released; /* For internal MNCC, if RTP addresses for endpoints become assigned by the MGW, implicitly notify the other * call leg's RTP_TO_CN side rtp_stream with rtp_stream_remote_addr_available(). */ @@ -58,15 +57,13 @@ void call_leg_init(struct gsm_network *net); struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released); + uint32_t parent_event_rtp_complete); void call_leg_reparent(struct call_leg *cl, struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released); + uint32_t parent_event_rtp_complete); int call_leg_local_bridge(struct call_leg *cl1, uint32_t call_id1, struct gsm_trans *trans1, struct call_leg *cl2, uint32_t call_id2, struct gsm_trans *trans2); diff --git a/include/osmocom/msc/msc_roles.h b/include/osmocom/msc/msc_roles.h index a1fab2f23..b22bc7b85 100644 --- a/include/osmocom/msc/msc_roles.h +++ b/include/osmocom/msc/msc_roles.h @@ -148,7 +148,6 @@ enum msc_common_events { MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED, MSC_EV_CALL_LEG_TERM, /* MNCC has told us to RTP_CREATE, but local RTP port has not yet been set up. diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index cb7e6ea80..1b7db2bbc 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -67,8 +67,7 @@ void call_leg_init(struct gsm_network *net) struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released) + uint32_t parent_event_rtp_complete) { struct call_leg *cl; struct osmo_fsm_inst *fi = osmo_fsm_inst_alloc_child(&call_leg_fsm, parent_fi, parent_event_term); @@ -82,7 +81,6 @@ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, .fi = fi, .parent_event_rtp_addr_available = parent_event_rtp_addr_available, .parent_event_rtp_complete = parent_event_rtp_complete, - .parent_event_rtp_released = parent_event_rtp_released, }; return cl; @@ -92,8 +90,7 @@ void call_leg_reparent(struct call_leg *cl, struct osmo_fsm_inst *new_parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released) + uint32_t parent_event_rtp_complete) { LOG_CALL_LEG(cl, LOGL_DEBUG, "Reparenting from parent %s to parent %s\n", cl->fi->proc.parent->name, new_parent_fi->name); @@ -101,7 +98,6 @@ void call_leg_reparent(struct call_leg *cl, talloc_steal(new_parent_fi, cl->fi); cl->parent_event_rtp_addr_available = parent_event_rtp_addr_available; cl->parent_event_rtp_complete = parent_event_rtp_complete; - cl->parent_event_rtp_released = parent_event_rtp_released; } static int call_leg_fsm_timer_cb(struct osmo_fsm_inst *fi) diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 5baed5458..77dd43df6 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -546,28 +546,15 @@ static struct gsm_trans *find_waiting_call(struct msc_a *msc_a) static void msc_a_cleanup_rtp_streams(struct msc_a *msc_a, uint32_t event, void *data) { - struct rtp_stream *rtps; - switch (event) { - case MSC_EV_CALL_LEG_RTP_RELEASED: - rtps = data; - if (msc_a->cc.mncc_forwarding_to_remote_ran - && msc_a->cc.mncc_forwarding_to_remote_ran->rtps == rtps) - msc_a->cc.mncc_forwarding_to_remote_ran->rtps = NULL; - if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran - && msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps == rtps) - msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps = NULL; - return; case MSC_EV_CALL_LEG_TERM: msc_a->cc.call_leg = NULL; if (msc_a->cc.mncc_forwarding_to_remote_ran) msc_a->cc.mncc_forwarding_to_remote_ran->rtps = NULL; - if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran) { - fprintf(stderr, "FOCKEN %p\n", msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps); + if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran) msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps = NULL; - } return; case MSC_MNCC_EV_CALL_ENDED: @@ -633,7 +620,6 @@ static void msc_a_fsm_communicating(struct osmo_fsm_inst *fi, uint32_t event, vo /* Nothing to do. */ return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_MNCC_EV_CALL_ENDED: /* Cleaned up above */ return; @@ -765,7 +751,6 @@ static void msc_a_fsm_releasing(struct osmo_fsm_inst *fi, uint32_t event, void * /* Already releasing */ return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: case MSC_MNCC_EV_CALL_ENDED: /* RTP streams cleaned up above */ @@ -819,7 +804,6 @@ const struct value_string msc_a_fsm_event_names[] = { OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), @@ -934,7 +918,6 @@ static const struct osmo_fsm_state msc_a_fsm_states[] = { | S(MSC_A_EV_UNUSED) | S(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE) | S(MSC_EV_CALL_LEG_RTP_COMPLETE) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_A_EV_HANDOVER_REQUIRED) @@ -950,7 +933,6 @@ static const struct osmo_fsm_state msc_a_fsm_states[] = { | S(MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST) | S(MSC_A_EV_FROM_I_SEND_END_SIGNAL_REQUEST) | S(MSC_A_EV_UNUSED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) , @@ -1590,8 +1572,7 @@ static int msc_a_start_assignment(struct msc_a *msc_a, struct gsm_trans *cc_tran cl = msc_a->cc.call_leg = call_leg_alloc(msc_a->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); OSMO_ASSERT(cl); /* HACK: We put the connection in loopback mode at the beginnig to diff --git a/src/libmsc/msc_i.c b/src/libmsc/msc_i.c index 05df9cb5d..f7aab0db1 100644 --- a/src/libmsc/msc_i.c +++ b/src/libmsc/msc_i.c @@ -278,7 +278,6 @@ const struct value_string msc_i_fsm_event_names[] = { OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index c6bba471f..8eefccc71 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -359,8 +359,7 @@ void msc_t_fsm_wait_local_rtp_onenter(struct osmo_fsm_inst *fi, uint32_t prev_st msc_t->inter_msc.call_leg = call_leg_alloc(msc_t->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); if (!msc_t->inter_msc.call_leg || call_leg_ensure_ci(msc_t->inter_msc.call_leg, RTP_TO_RAN, msc_t->inter_msc.callref, NULL, NULL, NULL) || call_leg_ensure_ci(msc_t->inter_msc.call_leg, RTP_TO_CN, msc_t->inter_msc.callref, NULL, NULL, NULL)) { @@ -391,7 +390,6 @@ void msc_t_fsm_wait_local_rtp(struct osmo_fsm_inst *fi, uint32_t event, void *da msc_t_send_stored_ho_request(msc_t); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -550,7 +548,6 @@ static void msc_t_fsm_wait_ho_request_ack(struct osmo_fsm_inst *fi, uint32_t eve msc_t_down_l2_co(msc_t, an_apdu, false); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -609,8 +606,7 @@ static int msc_t_wait_ho_complete_decode_cb(struct osmo_fsm_inst *msc_t_fi, void msc_i->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); /* msc_i_set_ran_conn() properly "steals" the ran_conn from msc_t */ msc_i_set_ran_conn(msc_i, msc_t->ran_conn); @@ -657,7 +653,6 @@ static void msc_t_fsm_wait_ho_complete(struct osmo_fsm_inst *fi, uint32_t event, msc_t_down_l2_co(msc_t, an_apdu, false); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -795,7 +790,6 @@ static const struct osmo_fsm_state msc_t_fsm_states[] = { .action = msc_t_fsm_wait_local_rtp, .in_event_mask = 0 | S(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_CN_CLOSE) @@ -810,7 +804,6 @@ static const struct osmo_fsm_state msc_t_fsm_states[] = { .in_event_mask = 0 | S(MSC_EV_FROM_RAN_UP_L2) | S(MSC_EV_FROM_RAN_CONN_RELEASED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST) @@ -827,7 +820,6 @@ static const struct osmo_fsm_state msc_t_fsm_states[] = { .in_event_mask = 0 | S(MSC_EV_FROM_RAN_UP_L2) | S(MSC_EV_FROM_RAN_CONN_RELEASED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST) @@ -841,7 +833,6 @@ const struct value_string msc_t_fsm_event_names[] = { OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), |