diff src/util.c @ 4650:4938d12f6d48

[gaim-migrate @ 4961] This is mostly just me cleaning up some of my mess. The one important change is... I set what is believed to be the UTF8 capability flag for ICQ. I'm hoping this will tell ICQ2002 and more recent that we are able to accept UTF8 messages. Please test this and let us know what happens. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 05 Mar 2003 05:10:47 +0000
parents 42d53c416bb9
children 6e3b8a8a143f
line wrap: on
line diff
--- a/src/util.c	Tue Mar 04 21:38:05 2003 +0000
+++ b/src/util.c	Wed Mar 05 05:10:47 2003 +0000
@@ -1307,3 +1307,14 @@
 
 	return(NULL);
 }
+
+char *gaim_getip_from_fd(int fd)
+{
+	struct sockaddr addr;
+	socklen_t namelen = sizeof(addr);
+
+	if (getsockname(fd, &addr, &namelen))
+		return NULL;
+
+	return g_strdup(inet_ntoa(((struct sockaddr_in *)&addr)->sin_addr));
+}