From 0aaba4588af43472b4fdc75ca32b2b3204d662ad Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 13 May 2013 16:17:19 -0500 Subject: [PATCH] fix stun lookup returning 1 for port --- src/switch_stun.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/switch_stun.c b/src/switch_stun.c index c6249c1ae9..68cd9a8190 100644 --- a/src/switch_stun.c +++ b/src/switch_stun.c @@ -207,8 +207,10 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, ui case SWITCH_STUN_ATTR_DESTINATION_ADDRESS: case SWITCH_STUN_ATTR_PRIORITY: { - uint32_t *u = (uint32_t *)attr->value; - *u = ntohl(*u); + switch_stun_ip_t *ip = (switch_stun_ip_t *) attr->value; + ip->port = ntohs(ip->port); + //uint32_t *u = (uint32_t *)attr->value; + //*u = ntohl(*u); } break; case SWITCH_STUN_ATTR_SOURCE_ADDRESS2: