]> git.eshelyaron.com Git - emacs.git/commitdiff
Return the correct server port number
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 1 Feb 2016 04:43:17 +0000 (05:43 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 1 Feb 2016 04:43:17 +0000 (05:43 +0100)
* process.c (connect_network_socket): Return the correct
server port number.

src/process.c

index b6721ada607891c4a255de0dd1920d322e8d883b..10c79ab14a3f4a67fdc34cecf32881e84dd195f8 100644 (file)
@@ -3104,6 +3104,9 @@ void connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses)
                  Lisp_Object service;
                  service = make_number (ntohs (sa1.sin_port));
                  contact = Fplist_put (contact, QCservice, service);
+                 // Save the port number so that we can stash it in
+                 // the process object later.
+                 ((struct sockaddr_in *)sa)->sin_port = sa1.sin_port;
                }
            }
 #endif