Mercurial > pidgin
changeset 13167:be0cd152691d
[gaim-migrate @ 15530]
rlaager noted that gaim_network_get_local_ip_from_fd is no longer used
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Tue, 07 Feb 2006 19:36:40 +0000 |
parents | f0577a01b2cf |
children | bdb8d7beb5a7 |
files | src/network.c |
diffstat | 1 files changed, 0 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network.c Tue Feb 07 19:32:22 2006 +0000 +++ b/src/network.c Tue Feb 07 19:36:40 2006 +0000 @@ -89,28 +89,6 @@ return gaim_prefs_get_string("/core/network/public_ip"); } -static const char * -gaim_network_get_local_ip_from_fd(int fd) -{ - struct sockaddr_in addr; - socklen_t len; - static char ip[16]; - const char *tmp; - - g_return_val_if_fail(fd >= 0, NULL); - - len = sizeof(addr); - if (getsockname(fd, (struct sockaddr *) &addr, &len) == -1) { - gaim_debug_warning("network", "getsockname: %s\n", strerror(errno)); - return NULL; - } - - tmp = inet_ntoa(addr.sin_addr); - strncpy(ip, tmp, sizeof(ip)); - - return ip; -} - const char * gaim_network_get_local_system_ip(int fd) {