fix stun lookup returning 1 for port

This commit is contained in:
Anthony Minessale 2013-05-13 16:17:19 -05:00
parent 97d47af882
commit 0aaba4588a

View File

@ -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: