From e9eb6107dbe3c3fa9671f032cd66030aa77409b0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 30 Jan 2016 02:25:08 +0100 Subject: [PATCH] Fix server connections * process.c (Fmake_network_process): Make creating server listening ports work again. --- src/process.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/process.c b/src/process.c index e40d7a46267..90e18d72014 100644 --- a/src/process.c +++ b/src/process.c @@ -3573,7 +3573,13 @@ usage: (make-network-process &rest ARGS) */) /* :host HOST -- hostname, ip address, or 'local for localhost. */ host = Fplist_get (contact, QChost); - if (!NILP (host)) + if (NILP (host)) + { + /* 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"); + } + else { if (EQ (host, Qlocal)) /* Depending on setup, "localhost" may map to different IPv4 and/or @@ -3810,7 +3816,7 @@ usage: (make-network-process &rest ARGS) */) /* If we're doing async address resolution, the list of addresses here will be nil, so we postpone connecting to the server. */ - if (NILP (ip_addresses)) + if (!p->is_server && NILP (ip_addresses)) { int channel; -- 2.39.5