diff options
| author | Lars Magne Ingebrigtsen | 2010-09-29 14:48:29 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2010-09-29 14:48:29 +0200 |
| commit | df7fcafff05c4002f35e507c65518f4b20ba5382 (patch) | |
| tree | dff32dbafc674846a125fd1d28a6ea79db90c522 /src/process.c | |
| parent | af7ef32d8e12d07c4a37df1685d997ac76641dd7 (diff) | |
| download | emacs-df7fcafff05c4002f35e507c65518f4b20ba5382.tar.gz emacs-df7fcafff05c4002f35e507c65518f4b20ba5382.zip | |
Make sure all reads/writes to gnutls streams go via the gnutls functions.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 4536dcc2a8e..a698e56fe39 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -672,6 +672,7 @@ make_process (Lisp_Object name) | |||
| 672 | #ifdef HAVE_GNUTLS | 672 | #ifdef HAVE_GNUTLS |
| 673 | p->gnutls_initstage = GNUTLS_STAGE_EMPTY; | 673 | p->gnutls_initstage = GNUTLS_STAGE_EMPTY; |
| 674 | p->gnutls_log_level = 0; | 674 | p->gnutls_log_level = 0; |
| 675 | p->gnutls_p = 0; | ||
| 675 | #endif | 676 | #endif |
| 676 | 677 | ||
| 677 | /* If name is already in use, modify it until it is unused. */ | 678 | /* If name is already in use, modify it until it is unused. */ |
| @@ -5203,8 +5204,8 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5203 | if (proc_buffered_char[channel] < 0) | 5204 | if (proc_buffered_char[channel] < 0) |
| 5204 | { | 5205 | { |
| 5205 | #ifdef HAVE_GNUTLS | 5206 | #ifdef HAVE_GNUTLS |
| 5206 | if (NETCONN_P(proc) && GNUTLS_PROCESS_USABLE (proc)) | 5207 | if (XPROCESS (proc)->gnutls_p) |
| 5207 | nbytes = emacs_gnutls_read (channel, XPROCESS (proc)->gnutls_state, | 5208 | nbytes = emacs_gnutls_read (channel, XPROCESS (proc), |
| 5208 | chars + carryover, readmax); | 5209 | chars + carryover, readmax); |
| 5209 | else | 5210 | else |
| 5210 | #endif | 5211 | #endif |
| @@ -5242,8 +5243,8 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5242 | chars[carryover] = proc_buffered_char[channel]; | 5243 | chars[carryover] = proc_buffered_char[channel]; |
| 5243 | proc_buffered_char[channel] = -1; | 5244 | proc_buffered_char[channel] = -1; |
| 5244 | #ifdef HAVE_GNUTLS | 5245 | #ifdef HAVE_GNUTLS |
| 5245 | if (NETCONN_P(proc) && GNUTLS_PROCESS_USABLE (proc)) | 5246 | if (XPROCESS (proc)->gnutls_p) |
| 5246 | nbytes = emacs_gnutls_read (channel, XPROCESS (proc)->gnutls_state, | 5247 | nbytes = emacs_gnutls_read (channel, XPROCESS (proc), |
| 5247 | chars + carryover + 1, readmax - 1); | 5248 | chars + carryover + 1, readmax - 1); |
| 5248 | else | 5249 | else |
| 5249 | #endif | 5250 | #endif |
| @@ -5658,9 +5659,9 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, | |||
| 5658 | #endif | 5659 | #endif |
| 5659 | { | 5660 | { |
| 5660 | #ifdef HAVE_GNUTLS | 5661 | #ifdef HAVE_GNUTLS |
| 5661 | if (NETCONN_P(proc) && GNUTLS_PROCESS_USABLE (proc)) | 5662 | if (XPROCESS (proc)->gnutls_p) |
| 5662 | rv = emacs_gnutls_write (outfd, | 5663 | rv = emacs_gnutls_write (outfd, |
| 5663 | XPROCESS (proc)->gnutls_state, | 5664 | XPROCESS (proc), |
| 5664 | (char *) buf, this); | 5665 | (char *) buf, this); |
| 5665 | else | 5666 | else |
| 5666 | #endif | 5667 | #endif |