[glib-networking] Only set GTLS errors when errors have occurred



commit 8a83f994ef5a5e55e1f06ef0cf10235515d926c8
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Tue Apr 26 18:30:11 2011 +0100

    Only set GTLS errors when errors have occurred
    
    https://bugzilla.gnome.org/show_bug.cgi?id=648687

 tls/gnutls/gtlsconnection-gnutls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index d9ba322..5b15910 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -527,7 +527,7 @@ end_gnutls_io (GTlsConnectionGnutls  *gnutls,
             ret == GNUTLS_E_WARNING_ALERT_RECEIVED) &&	\
            !gnutls->priv->error);			\
   ret = end_gnutls_io (gnutls, ret, error);		\
-  if (ret && error && !*error)				\
+  if (ret < 0 && error && !*error)			\
     {							\
       g_set_error (error, G_TLS_ERROR, G_TLS_ERROR_MISC,\
                    errmsg, gnutls_strerror (ret));	\



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