]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix stun lookup returning 1 for port
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 13 May 2013 21:17:19 +0000 (16:17 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 13 May 2013 21:17:19 +0000 (16:17 -0500)
src/switch_stun.c

index c6249c1ae990d2a1064033c94cfea3fb82d97c6d..68cd9a819056b51b17c2378307d9162d77b66f3d 100644 (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: