aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-10-09 15:19:30 +0200
committerLars Magne Ingebrigtsen2010-10-09 15:19:30 +0200
commitb845653dc0892fed76b7056f130ce9d4999d104d (patch)
tree5663c1bbbc387573516821f8c6c5baeaba77f7e6 /src
parent1736ad36f82bb498307b6a853a96254253c3e9c0 (diff)
downloademacs-b845653dc0892fed76b7056f130ce9d4999d104d.tar.gz
emacs-b845653dc0892fed76b7056f130ce9d4999d104d.zip
Make emacs_gnutls_read() return the expected on errors.
Also interface cleanups.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/gnutls.c13
2 files changed, 14 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3b3f20fb737..b147ab2d01f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-10-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnutls.c (syms_of_gnutls): All the bootprops are keywords.
4 (emacs_gnutls_write): Remove the debuggin fsync() call.
5 (emacs_gnutls_read): Return -1 if we got an error from
6 gnutls_read(). This allows us to actually read lots of data from
7 the GnuTLS stream.
8
12010-10-09 Chong Yidong <cyd@stupidchicken.com> 92010-10-09 Chong Yidong <cyd@stupidchicken.com>
2 10
3 * xterm.c (x_draw_relief_rect): Clear corner pixels. 11 * xterm.c (x_draw_relief_rect): Clear corner pixels.
diff --git a/src/gnutls.c b/src/gnutls.c
index 0913e1a3d2f..da5b10d3190 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -98,7 +98,6 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
98 nbyte -= rtnval; 98 nbyte -= rtnval;
99 bytes_written += rtnval; 99 bytes_written += rtnval;
100 } 100 }
101 fsync (STDOUT_FILENO);
102 101
103 return (bytes_written); 102 return (bytes_written);
104} 103}
@@ -120,7 +119,7 @@ emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
120 if (rtnval >= 0) 119 if (rtnval >= 0)
121 return rtnval; 120 return rtnval;
122 else 121 else
123 return 0; 122 return -1;
124} 123}
125 124
126/* convert an integer error to a Lisp_Object; it will be either a 125/* convert an integer error to a Lisp_Object; it will be either a
@@ -578,19 +577,19 @@ syms_of_gnutls (void)
578 Qgnutls_x509pki = intern_c_string ("gnutls-x509pki"); 577 Qgnutls_x509pki = intern_c_string ("gnutls-x509pki");
579 staticpro (&Qgnutls_x509pki); 578 staticpro (&Qgnutls_x509pki);
580 579
581 Qgnutls_bootprop_priority = intern_c_string ("priority"); 580 Qgnutls_bootprop_priority = intern_c_string (":priority");
582 staticpro (&Qgnutls_bootprop_priority); 581 staticpro (&Qgnutls_bootprop_priority);
583 582
584 Qgnutls_bootprop_trustfiles = intern_c_string ("trustfiles"); 583 Qgnutls_bootprop_trustfiles = intern_c_string (":trustfiles");
585 staticpro (&Qgnutls_bootprop_trustfiles); 584 staticpro (&Qgnutls_bootprop_trustfiles);
586 585
587 Qgnutls_bootprop_keyfiles = intern_c_string ("keyfiles"); 586 Qgnutls_bootprop_keyfiles = intern_c_string (":keyfiles");
588 staticpro (&Qgnutls_bootprop_keyfiles); 587 staticpro (&Qgnutls_bootprop_keyfiles);
589 588
590 Qgnutls_bootprop_callbacks = intern_c_string ("callbacks"); 589 Qgnutls_bootprop_callbacks = intern_c_string (":callbacks");
591 staticpro (&Qgnutls_bootprop_callbacks); 590 staticpro (&Qgnutls_bootprop_callbacks);
592 591
593 Qgnutls_bootprop_loglevel = intern_c_string ("loglevel"); 592 Qgnutls_bootprop_loglevel = intern_c_string (":loglevel");
594 staticpro (&Qgnutls_bootprop_loglevel); 593 staticpro (&Qgnutls_bootprop_loglevel);
595 594
596 Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted"); 595 Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted");