emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101869: Make emacs_gnutls_read() ret


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101869: Make emacs_gnutls_read() return the expected on errors.
Date: Sat, 09 Oct 2010 15:19:30 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101869
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sat 2010-10-09 15:19:30 +0200
message:
  Make emacs_gnutls_read() return the expected on errors.
  
  Also interface cleanups.
modified:
  src/ChangeLog
  src/gnutls.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-10-09 03:30:31 +0000
+++ b/src/ChangeLog     2010-10-09 13:19:30 +0000
@@ -1,3 +1,11 @@
+2010-10-09  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * gnutls.c (syms_of_gnutls): All the bootprops are keywords.
+       (emacs_gnutls_write): Remove the debuggin fsync() call.
+       (emacs_gnutls_read): Return -1 if we got an error from
+       gnutls_read().  This allows us to actually read lots of data from
+       the GnuTLS stream.
+
 2010-10-09  Chong Yidong  <address@hidden>
 
        * xterm.c (x_draw_relief_rect): Clear corner pixels.

=== modified file 'src/gnutls.c'
--- a/src/gnutls.c      2010-10-03 22:37:37 +0000
+++ b/src/gnutls.c      2010-10-09 13:19:30 +0000
@@ -98,7 +98,6 @@
       nbyte -= rtnval;
       bytes_written += rtnval;
     }
-  fsync (STDOUT_FILENO);
 
   return (bytes_written);
 }
@@ -120,7 +119,7 @@
   if (rtnval >= 0)
     return rtnval;
   else
-    return 0;
+    return -1;
 }
 
 /* convert an integer error to a Lisp_Object; it will be either a
@@ -578,19 +577,19 @@
   Qgnutls_x509pki = intern_c_string ("gnutls-x509pki");
   staticpro (&Qgnutls_x509pki);
 
-  Qgnutls_bootprop_priority = intern_c_string ("priority");
+  Qgnutls_bootprop_priority = intern_c_string (":priority");
   staticpro (&Qgnutls_bootprop_priority);
 
-  Qgnutls_bootprop_trustfiles = intern_c_string ("trustfiles");
+  Qgnutls_bootprop_trustfiles = intern_c_string (":trustfiles");
   staticpro (&Qgnutls_bootprop_trustfiles);
 
-  Qgnutls_bootprop_keyfiles = intern_c_string ("keyfiles");
+  Qgnutls_bootprop_keyfiles = intern_c_string (":keyfiles");
   staticpro (&Qgnutls_bootprop_keyfiles);
 
-  Qgnutls_bootprop_callbacks = intern_c_string ("callbacks");
+  Qgnutls_bootprop_callbacks = intern_c_string (":callbacks");
   staticpro (&Qgnutls_bootprop_callbacks);
 
-  Qgnutls_bootprop_loglevel = intern_c_string ("loglevel");
+  Qgnutls_bootprop_loglevel = intern_c_string (":loglevel");
   staticpro (&Qgnutls_bootprop_loglevel);
 
   Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted");


reply via email to

[Prev in Thread] Current Thread [Next in Thread]