diff lib/misc.c @ 952:a490d94a5b8e

2008-03-28 Brian Masney <masneyb@gftp.org> * lib/Makefile.am lib/misc.c lib/socket-connect.c lib/socket-connect-getaddrinfo.c lib/socket-connect-gethostbyname.c lib/sockutils.c lib/gftp.h - cleaned up more of the socket functions and split them up into their own files. Cleanups and bug fixes to the DNS lookup code.
author masneyb
date Fri, 28 Mar 2008 11:44:36 +0000
parents 5b681cba67b2
children 63555c9744c2
line wrap: on
line diff
--- a/lib/misc.c	Sat Mar 08 11:36:14 2008 +0000
+++ b/lib/misc.c	Fri Mar 28 11:44:36 2008 +0000
@@ -930,60 +930,6 @@
 }
 
 
-struct hostent *
-r_gethostbyname (const char *name, struct hostent *result_buf, int *h_errnop)
-{
-  static GStaticMutex hostfunclock = G_STATIC_MUTEX_INIT; 
-  struct hostent *hent;
-
-  if (g_thread_supported ())
-    g_static_mutex_lock (&hostfunclock);
-
-  if ((hent = gethostbyname (name)) == NULL)
-    {
-      if (h_errnop)
-        *h_errnop = h_errno;
-    }
-  else
-    {
-      *result_buf = *hent;
-      hent = result_buf;
-    }
-
-  if (g_thread_supported ())
-    g_static_mutex_unlock (&hostfunclock);
-
-  return (hent);
-}
-
-
-struct servent *
-r_getservbyname (const char *name, const char *proto,
-                 struct servent *result_buf, int *h_errnop)
-{
-  static GStaticMutex servfunclock = G_STATIC_MUTEX_INIT;
-  struct servent *sent;
-
-  if (g_thread_supported ())
-    g_static_mutex_lock (&servfunclock);
-
-  if ((sent = getservbyname (name, proto)) == NULL)
-    {
-      if (h_errnop)
-        *h_errnop = h_errno;
-    }
-  else
-    {
-      *result_buf = *sent;
-      sent = result_buf;
-    }
-
-  if (g_thread_supported ())
-    g_static_mutex_unlock (&servfunclock);
-  return (sent);
-}
-
-
 char *
 base64_encode (char *str)
 {