comparison src/network.c @ 8840:01c3db200c8f

[gaim-migrate @ 9607] Some good rendezvous fixes. Now if I could just find out why iTunes complains that it can't access my mp3 server when I sign on with Gaim... And 0 is a valid file descriptor. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 28 Apr 2004 04:38:12 +0000
parents 518455386538
children e40f9afd420e
comparison
equal deleted inserted replaced
8839:ebbc39e0050d 8840:01c3db200c8f
81 struct sockaddr_in addr; 81 struct sockaddr_in addr;
82 socklen_t len; 82 socklen_t len;
83 static char ip[16]; 83 static char ip[16];
84 const char *tmp; 84 const char *tmp;
85 85
86 g_return_val_if_fail(fd > 0, NULL); 86 g_return_val_if_fail(fd >= 0, NULL);
87 87
88 len = sizeof(addr); 88 len = sizeof(addr);
89 if (getsockname(fd, (struct sockaddr *) &addr, &len) == -1) { 89 if (getsockname(fd, (struct sockaddr *) &addr, &len) == -1) {
90 gaim_debug_warning("network", "getsockname: %s\n", strerror(errno)); 90 gaim_debug_warning("network", "getsockname: %s\n", strerror(errno));
91 return NULL; 91 return NULL;
104 char localhost[129]; 104 char localhost[129];
105 long unsigned add; 105 long unsigned add;
106 static char ip[46]; 106 static char ip[46];
107 const char *tmp = NULL; 107 const char *tmp = NULL;
108 108
109 if (fd != -1) 109 if (fd >= 0)
110 tmp = gaim_network_get_local_ip_from_fd(fd); 110 tmp = gaim_network_get_local_ip_from_fd(fd);
111 111
112 if (tmp) 112 if (tmp)
113 return tmp; 113 return tmp;
114 114