From a5e0cf09a60ccea624d43789b21e203bc0aa7f03 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 29 Aug 2018 14:33:01 +0200 Subject: [PATCH] mgcp_client_fsm: switch to MGCP_CONN_RECV_SEND in add_audio() The change Ie51cc86e90ffeca5b66bcb8f6db0d389241abe57 has replaced the functions make_crcx_msg_bind() and make_crcx_msg_bind_connect() with make_crcx_msg() and add_audio(). When a bidirectional connection is needed, the user calls add_audio() to add the remaining connection details. Unfortunately add_audio() leaves the conn_mode struct member unchanged. Which means the connection is still at MGCP_CONN_RECV_ONLY, which will instruct the MGW not to forward any of the received packets. - Make sure that conn_mode is set to MGCP_CONN_RECV_SEND when add_audio() is called. Change-Id: Id12de37797de5af5cc447642d2fbb1af7de680df Closes: OS#3511 --- src/libosmo-mgcp-client/mgcp_client_fsm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 0b5a2517e..5368ec34e 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -131,6 +131,7 @@ static void add_audio(struct mgcp_msg *mgcp_msg, struct mgcp_conn_peer *info) mgcp_msg->presence |= MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT; mgcp_msg->audio_ip = info->addr; mgcp_msg->audio_port = info->port; + mgcp_msg->conn_mode = MGCP_CONN_RECV_SEND; } static struct msgb *make_mdcx_msg(struct mgcp_ctx *mgcp_ctx)