Move error utility function to lib/
authorJelmer Vernooij <jelmer@samba.org>
Sat, 15 Mar 2008 17:31:03 +0000 (18:31 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 15 Mar 2008 17:31:03 +0000 (18:31 +0100)
lib/util.c
src/util.c

index 4676e448ea34b7934dea0a66b99fdc5c9f7d2be1..5d050de7985e58f0fb14926329f8bb326abbc378 100644 (file)
@@ -86,3 +86,16 @@ char *g_io_channel_ip_get_description(GIOChannel *ch)
        g_free(sa);
        return description;
 }
+
+const char *g_io_channel_unix_get_sock_error(GIOChannel *ioc)
+{
+       int valopt;
+       socklen_t valoptlen = sizeof(valopt);
+       int fd = g_io_channel_unix_get_fd(ioc);
+
+       getsockopt(fd, SOL_SOCKET, SO_ERROR, &valopt, &valoptlen);
+
+       return strerror(valopt);
+}
+
+
index 1d3fdb3249632ef41f057df97815ac289707135f..21072dd0eae91bd2507befce1cea82ab20a96871 100644 (file)
@@ -207,17 +207,6 @@ rep_g_mkdir_with_parents (const gchar *pathname,
   return 0;
 }
 
-const char *g_io_channel_unix_get_sock_error(GIOChannel *ioc)
-{
-       int valopt;
-       socklen_t valoptlen = sizeof(valopt);
-       int fd = g_io_channel_unix_get_fd(ioc);
-
-       getsockopt(fd, SOL_SOCKET, SO_ERROR, &valopt, &valoptlen);
-
-       return strerror(valopt);
-}
-
 pid_t read_pidfile(const char *path)
 {
        char *contents;