Sebastian Kuschel reports that pfd_closing can be called for a socket
[u/mdw/putty] / unix / ux_x11.c
index 0998069..63a92b5 100644 (file)
@@ -6,48 +6,18 @@
 #include <unistd.h>
 #include <assert.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #include "putty.h"
 #include "ssh.h"
 #include "network.h"
 
-void platform_get_x11_auth(struct X11Display *disp, const Config *cfg)
+void platform_get_x11_auth(struct X11Display *disp, Conf *conf)
 {
     char *xauthfile;
     int needs_free;
 
     /*
-     * Upgrade an IP-style localhost display to a Unix-socket
-     * display.
-     */
-    if (!disp->unixdomain && sk_address_is_local(disp->addr)) {
-       sk_addr_free(disp->addr);
-       disp->unixdomain = TRUE;
-       disp->addr = platform_get_x11_unix_address(NULL, disp->displaynum);
-       disp->realhost = dupprintf("unix:%d", disp->displaynum);
-       disp->port = 0;
-    }
-
-    /*
-     * Set the hostname for Unix-socket displays, so that we'll
-     * look it up correctly in the X authority file.
-     */
-    if (disp->unixdomain) {
-       int len;
-
-       sfree(disp->hostname);
-       len = 128;
-       do {
-           len *= 2;
-           disp->hostname = snewn(len, char);
-           if (gethostname(disp->hostname, len) < 0) {
-               disp->hostname = NULL;
-               return;
-           }
-       } while (strlen(disp->hostname) >= len-1);
-    }
-
-    /*
      * Find the .Xauthority file.
      */
     needs_free = FALSE;