aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/src/process.c b/src/process.c
index a02ba44ae71..05c4be27550 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3474,7 +3474,7 @@ usage: (make-network-process &rest ARGS) */)
3474 3474
3475 { 3475 {
3476 /* Setup coding systems for communicating with the network stream. */ 3476 /* Setup coding systems for communicating with the network stream. */
3477 struct gcpro inner_gcpro1; 3477 struct gcpro gcpro1;
3478 /* Qt denotes we have not yet called Ffind_operation_coding_system. */ 3478 /* Qt denotes we have not yet called Ffind_operation_coding_system. */
3479 Lisp_Object coding_systems = Qt; 3479 Lisp_Object coding_systems = Qt;
3480 Lisp_Object fargs[5], val; 3480 Lisp_Object fargs[5], val;
@@ -3502,9 +3502,9 @@ usage: (make-network-process &rest ARGS) */)
3502 { 3502 {
3503 fargs[0] = Qopen_network_stream, fargs[1] = name, 3503 fargs[0] = Qopen_network_stream, fargs[1] = name,
3504 fargs[2] = buffer, fargs[3] = host, fargs[4] = service; 3504 fargs[2] = buffer, fargs[3] = host, fargs[4] = service;
3505 GCPRO1_VAR (proc, inner_gcpro); 3505 GCPRO1 (proc);
3506 coding_systems = Ffind_operation_coding_system (5, fargs); 3506 coding_systems = Ffind_operation_coding_system (5, fargs);
3507 UNGCPRO_VAR (inner_gcpro); 3507 UNGCPRO;
3508 } 3508 }
3509 if (CONSP (coding_systems)) 3509 if (CONSP (coding_systems))
3510 val = XCAR (coding_systems); 3510 val = XCAR (coding_systems);
@@ -3535,9 +3535,9 @@ usage: (make-network-process &rest ARGS) */)
3535 { 3535 {
3536 fargs[0] = Qopen_network_stream, fargs[1] = name, 3536 fargs[0] = Qopen_network_stream, fargs[1] = name,
3537 fargs[2] = buffer, fargs[3] = host, fargs[4] = service; 3537 fargs[2] = buffer, fargs[3] = host, fargs[4] = service;
3538 GCPRO1_VAR (proc, inner_gcpro); 3538 GCPRO1 (proc);
3539 coding_systems = Ffind_operation_coding_system (5, fargs); 3539 coding_systems = Ffind_operation_coding_system (5, fargs);
3540 UNGCPRO_VAR (inner_gcpro); 3540 UNGCPRO;
3541 } 3541 }
3542 } 3542 }
3543 if (CONSP (coding_systems)) 3543 if (CONSP (coding_systems))
@@ -3717,7 +3717,7 @@ DEFUN ("network-interface-info", Fnetwork_interface_info, Snetwork_interface_inf
3717 doc: /* Return information about network interface named IFNAME. 3717 doc: /* Return information about network interface named IFNAME.
3718The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS), 3718The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS),
3719where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, 3719where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address,
3720NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and 3720NETMASK is the layer 3 network mask, HWADDR is the layer 2 address, and
3721FLAGS is the current flags of the interface. */) 3721FLAGS is the current flags of the interface. */)
3722 (Lisp_Object ifname) 3722 (Lisp_Object ifname)
3723{ 3723{
@@ -4630,26 +4630,29 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
4630 the gnutls library -- 2.12.14 has been confirmed 4630 the gnutls library -- 2.12.14 has been confirmed
4631 to need it. See 4631 to need it. See
4632 http://comments.gmane.org/gmane.emacs.devel/145074 */ 4632 http://comments.gmane.org/gmane.emacs.devel/145074 */
4633 struct Lisp_Process *proc;
4634 for (channel = 0; channel < MAXDESC; ++channel) 4633 for (channel = 0; channel < MAXDESC; ++channel)
4635 { 4634 if (! NILP (chan_process[channel]))
4636 if (! NILP (chan_process[channel]) && 4635 {
4637 (proc = XPROCESS (chan_process[channel])) != NULL && 4636 struct Lisp_Process *p =
4638 proc->gnutls_p && 4637 XPROCESS (chan_process[channel]);
4639 proc->infd && 4638 if (p && p->gnutls_p && p->infd
4640 emacs_gnutls_record_check_pending (proc->gnutls_state) > 0) 4639 && ((emacs_gnutls_record_check_pending
4641 { 4640 (p->gnutls_state))
4642 nfds++; 4641 > 0))
4643 FD_SET (proc->infd, &Available); 4642 {
4644 } 4643 nfds++;
4645 } 4644 FD_SET (p->infd, &Available);
4645 }
4646 }
4646 } 4647 }
4647 else 4648 else
4648 { 4649 {
4649 /* Check this specific channel. */ 4650 /* Check this specific channel. */
4650 if (wait_proc->gnutls_p && /* Check for valid process. */ 4651 if (wait_proc->gnutls_p /* Check for valid process. */
4651 /* Do we have pending data? */ 4652 /* Do we have pending data? */
4652 emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0) 4653 && ((emacs_gnutls_record_check_pending
4654 (wait_proc->gnutls_state))
4655 > 0))
4653 { 4656 {
4654 nfds = 1; 4657 nfds = 1;
4655 /* Set to Available. */ 4658 /* Set to Available. */