summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Luebbe <jluebbe@debian.org>2017-12-27 21:34:44 +0100
committerthe 34c3 gsm team <34c3-gsm@congress>2017-12-27 21:37:41 +0100
commit3272a0da582ea1f4ecf6d07190a7a2f2648afc46 (patch)
treec545a6950f29e828a8b4b3b6156baa36b6b6b114
parent5350525a5786b9dbc612231b5c0a17d2b1a67c5b (diff)
both MNCC and call_leg.ip is in host byte order
-rw-r--r--src/mncc.c2
-rw-r--r--src/sdp.c4
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);