# HG changeset patch # User Richard Laager # Date 1124346965 0 # Node ID dd1a5969b2e580d83ccff438920cb89e0ab4ec67 # Parent 421007f39e535673a3c5db0defcd990ffd6b71bf [gaim-migrate @ 13500] Fix two C99isms. I recommend -Wdeclaration-after-statement for everyone. committer: Tailor Script diff -r 421007f39e53 -r dd1a5969b2e5 src/stun.c --- a/src/stun.c Thu Aug 18 06:33:33 2005 +0000 +++ b/src/stun.c Thu Aug 18 06:36:05 2005 +0000 @@ -61,6 +61,9 @@ struct in_addr in; struct stun_attrib *attrib; struct stun_header *hdr; + struct ifconf ifc; + struct ifreq *ifr; + struct sockaddr_in *sinptr; len = recv(source, buffer, 10240, 0); @@ -85,9 +88,6 @@ nattype.type = 1; // is it a NAT? - struct ifconf ifc; - struct ifreq *ifr; - struct sockaddr_in *sinptr; ifc.ifc_len = sizeof(buffer); ifc.ifc_req = (struct ifreq *) buffer; @@ -119,6 +119,8 @@ struct sockaddr_in addr; struct stun_header data; int ret = 0; + const char *ip = gaim_prefs_get_string("/core/network/stun_ip"); + int port = gaim_prefs_get_int("/core/network/stun_port"); if(nattype.status == 1) { // currently discovering callbacks = g_slist_append(callbacks, cb); @@ -147,9 +149,6 @@ return &nattype; } incb = gaim_input_add(fd, GAIM_INPUT_READ, reply_cb, NULL); - - const char *ip = gaim_prefs_get_string("/core/network/stun_ip"); - int port = gaim_prefs_get_int("/core/network/stun_port"); if(port == 0 || ip == NULL || ip[0] == '\0') return NULL;