Mercurial > pidgin.yaz
changeset 11300:dd1a5969b2e5
[gaim-migrate @ 13500]
Fix two C99isms. I recommend -Wdeclaration-after-statement for everyone.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 18 Aug 2005 06:36:05 +0000 |
parents | 421007f39e53 |
children | a09a5d64f33f |
files | src/stun.c |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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;