emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107273: * gnutls.c (emacs_gnutls_wri


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107273: * gnutls.c (emacs_gnutls_write): Fix last change.
Date: Mon, 13 Feb 2012 21:39:46 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107273
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Mon 2012-02-13 21:39:46 +0100
message:
  * gnutls.c (emacs_gnutls_write): Fix last change.
modified:
  src/ChangeLog
  src/gnutls.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-02-13 19:37:48 +0000
+++ b/src/ChangeLog     2012-02-13 20:39:46 +0000
@@ -1,3 +1,7 @@
+2012-02-13  Andreas Schwab  <address@hidden>
+
+       * gnutls.c (emacs_gnutls_write): Fix last change.
+
 2012-02-13  Lars Ingebrigtsen  <address@hidden>
 
        * gnutls.c (emacs_gnutls_write): Set errno appropriately for

=== modified file 'src/gnutls.c'
--- a/src/gnutls.c      2012-02-13 19:37:48 +0000
+++ b/src/gnutls.c      2012-02-13 20:39:46 +0000
@@ -345,15 +345,16 @@
   EMACS_INT bytes_written;
   gnutls_session_t state = proc->gnutls_state;
 
-  if (proc->gnutls_initstage != GNUTLS_STAGE_READY) {
+  if (proc->gnutls_initstage != GNUTLS_STAGE_READY)
+    {
 #ifdef EWOULDBLOCK
-    errno = EWOULDBLOCK;
+      errno = EWOULDBLOCK;
 #endif
 #ifdef EAGAIN
-    errno = EAGAIN;
+      errno = EAGAIN;
 #endif
-    return 0;
-  }
+      return 0;
+    }
 
   bytes_written = 0;
 
@@ -365,20 +366,22 @@
        {
          if (rtnval == GNUTLS_E_INTERRUPTED)
            continue;
-         else {
-           /* If we get EAGAIN, then set errno appropriately so that
-              send_process retries the correct way instead of
-              erroring out. */
-           if (rtnval == EAGAIN) {
+         else
+           {
+             /* If we get GNUTLS_E_AGAIN, then set errno
+                appropriately so that send_process retries the
+                correct way instead of erroring out. */
+             if (rtnval == GNUTLS_E_AGAIN)
+               {
 #ifdef EWOULDBLOCK
-             errno = EWOULDBLOCK;
+                 errno = EWOULDBLOCK;
 #endif
 #ifdef EAGAIN
-             errno = EAGAIN;
+                 errno = EAGAIN;
 #endif
+               }
+             break;
            }
-           break;
-         }
        }
 
       buf += rtnval;


reply via email to

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