From f9773b0b9716845d24b37c9a0a834e448c805cf5 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 29 Nov 2018 23:01:58 +0100 Subject: [PATCH] drop unused gsm_network->handover.active gsm_network contains an int handover.active which is always zero. Drop it. There is real handover code coming up soon, one part of this is to avoid confusion. The internal MNCC code queried it to decide whether to MNCC_BRIDGE or proxy RTP (MNCC_FRAME_RECV). Since RTP is being handled by osmo-mgw since forever, drop that entire condition from mncc_builtin. Change-Id: Ie16e718266882588b38297121364ca0b7fdfe948 --- include/osmocom/msc/gsm_data.h | 3 --- src/libmsc/mncc_builtin.c | 19 ++----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 4d3a2e455..94a6ffdc9 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -283,9 +283,6 @@ struct gsm_network { uint8_t a5_encryption_mask; bool authentication_required; int send_mm_info; - struct { - int active; - } handover; struct rate_ctr_group *msc_ctrs; struct osmo_counter *active_calls; diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c index d6f3e3d65..135a5e4cd 100644 --- a/src/libmsc/mncc_builtin.c +++ b/src/libmsc/mncc_builtin.c @@ -166,8 +166,7 @@ static int mncc_notify_ind(struct gsm_call *call, int msg_type, static int mncc_setup_cnf(struct gsm_call *call, int msg_type, struct gsm_mncc *connect) { - struct gsm_mncc connect_ack, frame_recv; - struct gsm_network *net = call->net; + struct gsm_mncc connect_ack; struct gsm_call *remote; struct gsm_mncc_bridge bridge = { .msg_type = MNCC_BRIDGE }; @@ -189,21 +188,7 @@ static int mncc_setup_cnf(struct gsm_call *call, int msg_type, bridge.callref[1] = call->remote_ref; DEBUGP(DMNCC, "(call %x) Bridging with remote.\n", call->callref); - /* proxy mode */ - if (!net->handover.active) { - /* in the no-handover case, we can bridge, i.e. use - * the old RTP proxy code */ - return mncc_tx_to_cc(call->net, MNCC_BRIDGE, &bridge); - } else { - /* in case of handover, we need to re-write the RTP - * SSRC, sequence and timestamp values and thus - * need to enable RTP receive for both directions */ - memset(&frame_recv, 0, sizeof(struct gsm_mncc)); - frame_recv.callref = call->callref; - mncc_tx_to_cc(call->net, MNCC_FRAME_RECV, &frame_recv); - frame_recv.callref = call->remote_ref; - return mncc_tx_to_cc(call->net, MNCC_FRAME_RECV, &frame_recv); - } + return mncc_tx_to_cc(call->net, MNCC_BRIDGE, &bridge); } static int mncc_disc_ind(struct gsm_call *call, int msg_type,