diff options
| author | Noam Postavsky | 2018-07-09 20:06:27 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-07-09 20:06:27 -0400 |
| commit | 6b8349a90274686d9cb67a2ffaac2d930d5f6b46 (patch) | |
| tree | d2fbc56f7a21120951cb0c14bbe349e388b35e62 /src | |
| parent | 6de90fb41b63d33457c1fa41cbb4bd8b25e4cc7f (diff) | |
| parent | db3f7797809ed9de8dd92ce38bf34f768ddc64ad (diff) | |
| download | emacs-6b8349a90274686d9cb67a2ffaac2d930d5f6b46.tar.gz emacs-6b8349a90274686d9cb67a2ffaac2d930d5f6b46.zip | |
Merge from emacs-26
db3f779780 ; Test for Bug#32014
90d95b000c Explicitly reject :server and :nowait (Bug#31903)
917158f8c9 Fix Bug#32090
# Conflicts:
# src/process.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/process.c b/src/process.c index 279b74bc66e..5bd8c255a26 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3897,12 +3897,15 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3897 | filter = Fplist_get (contact, QCfilter); | 3897 | filter = Fplist_get (contact, QCfilter); |
| 3898 | sentinel = Fplist_get (contact, QCsentinel); | 3898 | sentinel = Fplist_get (contact, QCsentinel); |
| 3899 | use_external_socket_p = Fplist_get (contact, QCuse_external_socket); | 3899 | use_external_socket_p = Fplist_get (contact, QCuse_external_socket); |
| 3900 | Lisp_Object server = Fplist_get (contact, QCserver); | ||
| 3901 | bool nowait = !NILP (Fplist_get (contact, QCnowait)); | ||
| 3900 | 3902 | ||
| 3903 | if (!NILP (server) && nowait) | ||
| 3904 | error ("`:server' is incompatible with `:nowait'"); | ||
| 3901 | CHECK_STRING (name); | 3905 | CHECK_STRING (name); |
| 3902 | 3906 | ||
| 3903 | /* :local ADDRESS or :remote ADDRESS */ | 3907 | /* :local ADDRESS or :remote ADDRESS */ |
| 3904 | tem = Fplist_get (contact, QCserver); | 3908 | if (!NILP (server)) |
| 3905 | if (NILP (tem)) | ||
| 3906 | address = Fplist_get (contact, QCremote); | 3909 | address = Fplist_get (contact, QCremote); |
| 3907 | else | 3910 | else |
| 3908 | address = Fplist_get (contact, QClocal); | 3911 | address = Fplist_get (contact, QClocal); |
| @@ -4017,7 +4020,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 4017 | } | 4020 | } |
| 4018 | 4021 | ||
| 4019 | #ifdef HAVE_GETADDRINFO_A | 4022 | #ifdef HAVE_GETADDRINFO_A |
| 4020 | if (!NILP (Fplist_get (contact, QCnowait))) | 4023 | if (nowait) |
| 4021 | { | 4024 | { |
| 4022 | ptrdiff_t hostlen = SBYTES (host); | 4025 | ptrdiff_t hostlen = SBYTES (host); |
| 4023 | struct req | 4026 | struct req |
| @@ -4164,20 +4167,13 @@ usage: (make-network-process &rest ARGS) */) | |||
| 4164 | 4167 | ||
| 4165 | set_network_socket_coding_system (proc, host, service, name); | 4168 | set_network_socket_coding_system (proc, host, service, name); |
| 4166 | 4169 | ||
| 4167 | /* :server BOOL */ | 4170 | /* :server QLEN */ |
| 4168 | tem = Fplist_get (contact, QCserver); | 4171 | p->is_server = !NILP (server); |
| 4169 | if (!NILP (tem)) | 4172 | if (TYPE_RANGED_INTEGERP (int, server)) |
| 4170 | { | 4173 | p->backlog = XINT (server); |
| 4171 | /* Don't support network sockets when non-blocking mode is | ||
| 4172 | not available, since a blocked Emacs is not useful. */ | ||
| 4173 | p->is_server = true; | ||
| 4174 | if (TYPE_RANGED_INTEGERP (int, tem)) | ||
| 4175 | p->backlog = XINT (tem); | ||
| 4176 | } | ||
| 4177 | 4174 | ||
| 4178 | /* :nowait BOOL */ | 4175 | /* :nowait BOOL */ |
| 4179 | if (!p->is_server && socktype != SOCK_DGRAM | 4176 | if (!p->is_server && socktype != SOCK_DGRAM && nowait) |
| 4180 | && !NILP (Fplist_get (contact, QCnowait))) | ||
| 4181 | p->is_non_blocking_client = true; | 4177 | p->is_non_blocking_client = true; |
| 4182 | 4178 | ||
| 4183 | bool postpone_connection = false; | 4179 | bool postpone_connection = false; |