From 3272a0da582ea1f4ecf6d07190a7a2f2648afc46 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Wed, 27 Dec 2017 21:34:44 +0100 Subject: both MNCC and call_leg.ip is in host byte order --- src/mncc.c | 2 +- src/sdp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mncc.c b/src/mncc.c index 12f0881..fe16683 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -224,7 +224,7 @@ static bool send_rtp_connect(struct mncc_call_leg *leg, struct call_leg *other) */ mncc.msg_type = MNCC_RTP_CONNECT; mncc.callref = leg->callref; - mncc.ip = htonl(other->ip); + mncc.ip = other->ip; mncc.port = other->port; mncc.payload_type = other->payload_type; /* diff --git a/src/sdp.c b/src/sdp.c index 35c0c59..ee389b6 100644 --- a/src/sdp.c +++ b/src/sdp.c @@ -125,7 +125,7 @@ bool sdp_extract_sdp(struct sip_call_leg *leg, const sip_t *sip, bool any_codec) if (conn->c_addrtype != sdp_addr_ip4) continue; inet_aton(conn->c_address, &addr); - leg->base.ip = addr.s_addr; + leg->base.ip = ntohl(addr.s_addr); found_conn = true; break; } @@ -165,7 +165,7 @@ bool sdp_extract_sdp(struct sip_call_leg *leg, const sip_t *sip, bool any_codec) char *sdp_create_file(struct sip_call_leg *leg, struct call_leg *other) { - struct in_addr net = { .s_addr = ntohl(other->ip) }; + struct in_addr net = { .s_addr = htonl(other->ip) }; char *fmtp_str = NULL, *sdp; leg->wanted_codec = app_media_name(other->payload_msg_type); -- cgit v1.2.3