diff options
| author | Stefan Monnier | 2002-04-01 19:50:51 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-04-01 19:50:51 +0000 |
| commit | bed9664a999fc92bec580282fbb9bba3663adbc3 (patch) | |
| tree | 09fc0cfa54aa0de85158d995a1a0feaed197a5da /src/process.c | |
| parent | 0fc8f792bac83d74d121d0421a055d77b2f9d264 (diff) | |
| download | emacs-bed9664a999fc92bec580282fbb9bba3663adbc3.tar.gz emacs-bed9664a999fc92bec580282fbb9bba3663adbc3.zip | |
(DATAGRAM_CONN_P, list_processes_1)
(Fprocess_datagram_address, Fset_process_datagram_address)
(Fset_network_process_options, server_accept_connection):
Fix some int/Lisp_Object confusions (thank you union types).
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/process.c b/src/process.c index 3742fe23ad2..b7c5076a2a9 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -307,7 +307,7 @@ struct sockaddr_and_len { | |||
| 307 | int len; | 307 | int len; |
| 308 | } datagram_address[MAXDESC]; | 308 | } datagram_address[MAXDESC]; |
| 309 | #define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0) | 309 | #define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0) |
| 310 | #define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0) | 310 | #define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XINT (XPROCESS (proc)->infd)].sa != 0) |
| 311 | #else | 311 | #else |
| 312 | #define DATAGRAM_CHAN_P(chan) (0) | 312 | #define DATAGRAM_CHAN_P(chan) (0) |
| 313 | #define DATAGRAM_CONN_P(proc) (0) | 313 | #define DATAGRAM_CONN_P(proc) (0) |
| @@ -1200,7 +1200,7 @@ list_processes_1 (query_only) | |||
| 1200 | if (INTEGERP (port)) | 1200 | if (INTEGERP (port)) |
| 1201 | port = Fnumber_to_string (port); | 1201 | port = Fnumber_to_string (port); |
| 1202 | sprintf (tembuf, "(network %s server on %s)\n", | 1202 | sprintf (tembuf, "(network %s server on %s)\n", |
| 1203 | (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"), | 1203 | (DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"), |
| 1204 | XSTRING (port)->data); | 1204 | XSTRING (port)->data); |
| 1205 | insert_string (tembuf); | 1205 | insert_string (tembuf); |
| 1206 | } | 1206 | } |
| @@ -1216,7 +1216,7 @@ list_processes_1 (query_only) | |||
| 1216 | host = Fnumber_to_string (host); | 1216 | host = Fnumber_to_string (host); |
| 1217 | } | 1217 | } |
| 1218 | sprintf (tembuf, "(network %s connection to %s)\n", | 1218 | sprintf (tembuf, "(network %s connection to %s)\n", |
| 1219 | (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"), | 1219 | (DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"), |
| 1220 | XSTRING (host)->data); | 1220 | XSTRING (host)->data); |
| 1221 | insert_string (tembuf); | 1221 | insert_string (tembuf); |
| 1222 | } | 1222 | } |
| @@ -2119,7 +2119,7 @@ DEFUN ("process-datagram-address", Fprocess_datagram_address, Sprocess_datagram_ | |||
| 2119 | if (!DATAGRAM_CONN_P (process)) | 2119 | if (!DATAGRAM_CONN_P (process)) |
| 2120 | return Qnil; | 2120 | return Qnil; |
| 2121 | 2121 | ||
| 2122 | channel = XPROCESS (process)->infd; | 2122 | channel = XINT (XPROCESS (process)->infd); |
| 2123 | return conv_sockaddr_to_lisp (datagram_address[channel].sa, | 2123 | return conv_sockaddr_to_lisp (datagram_address[channel].sa, |
| 2124 | datagram_address[channel].len); | 2124 | datagram_address[channel].len); |
| 2125 | } | 2125 | } |
| @@ -2139,7 +2139,7 @@ Returns nil upon error setting address, ADDRESS otherwise. */) | |||
| 2139 | if (!DATAGRAM_CONN_P (process)) | 2139 | if (!DATAGRAM_CONN_P (process)) |
| 2140 | return Qnil; | 2140 | return Qnil; |
| 2141 | 2141 | ||
| 2142 | channel = XPROCESS (process)->infd; | 2142 | channel = XINT (XPROCESS (process)->infd); |
| 2143 | 2143 | ||
| 2144 | len = get_lisp_to_sockaddr_size (address, &family); | 2144 | len = get_lisp_to_sockaddr_size (address, &family); |
| 2145 | if (datagram_address[channel].len != len) | 2145 | if (datagram_address[channel].len != len) |
| @@ -2374,10 +2374,10 @@ usage: (set-network-process-options PROCESS &rest OPTIONS) */) | |||
| 2374 | 2374 | ||
| 2375 | process = args[0]; | 2375 | process = args[0]; |
| 2376 | CHECK_PROCESS (process); | 2376 | CHECK_PROCESS (process); |
| 2377 | if (nargs > 1 && XPROCESS (process)->infd >= 0) | 2377 | if (nargs > 1 && XINT (XPROCESS (process)->infd) >= 0) |
| 2378 | { | 2378 | { |
| 2379 | opts = Flist (nargs, args); | 2379 | opts = Flist (nargs, args); |
| 2380 | set_socket_options (XPROCESS (process)->infd, opts, 0); | 2380 | set_socket_options (XINT (XPROCESS (process)->infd), opts, 0); |
| 2381 | } | 2381 | } |
| 2382 | return process; | 2382 | return process; |
| 2383 | } | 2383 | } |
| @@ -3528,7 +3528,7 @@ server_accept_connection (server, channel) | |||
| 3528 | (STRINGP (host) ? host : build_string ("-")), | 3528 | (STRINGP (host) ? host : build_string ("-")), |
| 3529 | build_string ("\n"))); | 3529 | build_string ("\n"))); |
| 3530 | 3530 | ||
| 3531 | if (p->sentinel) | 3531 | if (!NILP (p->sentinel)) |
| 3532 | exec_sentinel (proc, | 3532 | exec_sentinel (proc, |
| 3533 | concat3 (build_string ("open from "), | 3533 | concat3 (build_string ("open from "), |
| 3534 | (STRINGP (host) ? host : build_string ("-")), | 3534 | (STRINGP (host) ? host : build_string ("-")), |