From 76bf44370e7b1215bb8f6125eea03102fc8f786d Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 1 Feb 2016 05:43:17 +0100 Subject: [PATCH] Return the correct server port number * process.c (connect_network_socket): Return the correct server port number. --- src/process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/process.c b/src/process.c index b6721ada607..10c79ab14a3 100644 --- a/src/process.c +++ b/src/process.c @@ -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 -- 2.39.5