diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/process.c | 42 |
2 files changed, 38 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ef9aa4a907f..45e8eb1025d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * process.c (wait_reading_process_output): Fix asynchrounous | ||
| 4 | GnuTLS socket handling on some versions of the GnuTLS library. | ||
| 5 | |||
| 1 | 2011-11-21 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2011-11-21 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * xterm.c (x_clear_frame): Reinstate the XClearWindow call. | 8 | * xterm.c (x_clear_frame): Reinstate the XClearWindow call. |
diff --git a/src/process.c b/src/process.c index bea9e72019b..02eb1122a07 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4620,15 +4620,39 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4620 | some data in the TCP buffers so that select works, but | 4620 | some data in the TCP buffers so that select works, but |
| 4621 | with custom pull/push functions we need to check if some | 4621 | with custom pull/push functions we need to check if some |
| 4622 | data is available in the buffers manually. */ | 4622 | data is available in the buffers manually. */ |
| 4623 | if (nfds == 0 && | 4623 | if (nfds == 0) |
| 4624 | wait_proc && wait_proc->gnutls_p /* Check for valid process. */ | 4624 | { |
| 4625 | /* Do we have pending data? */ | 4625 | if (! wait_proc) |
| 4626 | && emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0) | 4626 | { |
| 4627 | { | 4627 | /* We're not waiting on a specific process, so loop |
| 4628 | nfds = 1; | 4628 | through all the channels and check for data. */ |
| 4629 | /* Set to Available. */ | 4629 | struct Lisp_Process *proc; |
| 4630 | FD_SET (wait_proc->infd, &Available); | 4630 | for (channel = 0; channel < MAXDESC; ++channel) |
| 4631 | } | 4631 | { |
| 4632 | if (! NILP (chan_process[channel]) && | ||
| 4633 | (proc = XPROCESS (chan_process[channel])) != NULL && | ||
| 4634 | proc->gnutls_p && | ||
| 4635 | proc->infd && | ||
| 4636 | emacs_gnutls_record_check_pending (proc->gnutls_state) > 0) | ||
| 4637 | { | ||
| 4638 | nfds++; | ||
| 4639 | FD_SET (proc->infd, &Available); | ||
| 4640 | } | ||
| 4641 | } | ||
| 4642 | } | ||
| 4643 | else | ||
| 4644 | { | ||
| 4645 | /* Check this specific channel. */ | ||
| 4646 | if (wait_proc->gnutls_p && /* Check for valid process. */ | ||
| 4647 | /* Do we have pending data? */ | ||
| 4648 | emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0) | ||
| 4649 | { | ||
| 4650 | nfds = 1; | ||
| 4651 | /* Set to Available. */ | ||
| 4652 | FD_SET (wait_proc->infd, &Available); | ||
| 4653 | } | ||
| 4654 | } | ||
| 4655 | } | ||
| 4632 | #endif | 4656 | #endif |
| 4633 | } | 4657 | } |
| 4634 | 4658 | ||