aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-13 20:06:53 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-08-07 02:12:14 +0200
commit11186c000e1d0e6005f431de5ca24c5f1bcb265c (patch)
tree45bec12c406956bcb7a468a0fb636957e58d50c1
parentb5fe7c209c486056247d99e78609a2cb29a5a4f1 (diff)
mncc_recv_rtp() add sdp arg
-rw-r--r--src/libmsc/gsm_04_08_cc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 2fc34b318..790386c96 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -1692,7 +1692,7 @@ static int gsm48_cc_rx_userinfo(struct gsm_trans *trans, struct msgb *msg)
static int mncc_recv_rtp(struct gsm_network *net, struct gsm_trans *trans, uint32_t callref,
int cmd, struct osmo_sockaddr_str *rtp_addr, uint32_t payload_type,
- uint32_t payload_msg_type)
+ uint32_t payload_msg_type, const struct sdp_msg *sdp)
{
uint8_t data[sizeof(struct gsm_mncc)];
struct gsm_mncc_rtp *rtp;
@@ -1708,12 +1708,16 @@ static int mncc_recv_rtp(struct gsm_network *net, struct gsm_trans *trans, uint3
}
rtp->payload_type = payload_type;
rtp->payload_msg_type = payload_msg_type;
+ if (sdp) {
+ LOG_TRANS(trans, LOGL_DEBUG, "%s SDP: %s\n", get_mncc_name(rtp->msg_type), sdp_msg_to_str(sdp));
+ sdp_msg_to_sdp_str_buf(rtp->sdp, sizeof(rtp->sdp), sdp);
+ }
return mncc_recvmsg(net, trans, cmd, (struct gsm_mncc *)data);
}
static void mncc_recv_rtp_err(struct gsm_network *net, struct gsm_trans *trans, uint32_t callref, int cmd)
{
- mncc_recv_rtp(net, trans, callref, cmd, NULL, 0, 0);
+ mncc_recv_rtp(net, trans, callref, cmd, NULL, 0, 0, NULL);
}
static int tch_rtp_create(struct gsm_network *net, uint32_t callref)
@@ -1784,7 +1788,7 @@ int gsm48_tch_rtp_create(struct gsm_trans *trans)
}
return mncc_recv_rtp(net, trans, trans->callref, MNCC_RTP_CREATE, rtp_cn_local,
- codec->payload_type, mncc_payload_msg_type);
+ codec->payload_type, mncc_payload_msg_type, NULL);
}
static int tch_rtp_connect(struct gsm_network *net, const struct gsm_mncc_rtp *rtp)