]> code.delx.au - gnu-emacs/commitdiff
Save correct server data
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Jan 2016 03:34:48 +0000 (04:34 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Jan 2016 03:34:48 +0000 (04:34 +0100)
* process.c (connect_network_socket): Save the correct contact
info for servers.

src/process.c

index aef74d3d4746adfdfb15d7bc874ca09480ec063d..06fb68587858b0928b5b53a82ed702b289209ece 100644 (file)
@@ -3218,7 +3218,7 @@ void connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses)
        }
 #endif
 
-      contact = Fplist_put (contact, p->is_server? QCremote: QClocal,
+      contact = Fplist_put (contact, p->is_server? QClocal: QCremote,
                            conv_sockaddr_to_lisp (sa, addrlen));
 #ifdef HAVE_GETSOCKNAME
       if (!p->is_server)
@@ -3577,7 +3577,8 @@ usage: (make-network-process &rest ARGS)  */)
     {
       /* The "connection" function gets it bind info from the address we're
         given, so use this dummy address if nothing is specified. */
-      host = build_string ("127.0.0.1");
+      if (family != AF_LOCAL)
+       host = build_string ("127.0.0.1");
     }
   else
     {