Blob Blame History Raw
commit 15ebd31f77412e869c2bd7264a53117eb90d1229
Author: Andrew Beekhof <andrew@beekhof.net>
Date:   Tue Oct 15 10:01:05 2013 +1100

    Log: remote: Improved logging of recv() errors
    
    (cherry picked from commit 3647b64d004b4377c90963de5ccbec45d1daef72)

diff --git a/lib/common/remote.c b/lib/common/remote.c
index 297c75a..c991761 100644
--- a/lib/common/remote.c
+++ b/lib/common/remote.c
@@ -459,7 +459,7 @@ crm_remote_recv_once(crm_remote_t * remote)
         } else if (rc == GNUTLS_E_AGAIN) {
             rc = -EAGAIN;
         } else if (rc < 0) {
-            crm_info("TLS receive failed: %s (%d)", gnutls_strerror(rc), rc);
+            crm_debug("TLS receive failed: %s (%d)", gnutls_strerror(rc), rc);
             rc = -pcmk_err_generic;
         }
 #endif
@@ -482,9 +482,9 @@ crm_remote_recv_once(crm_remote_t * remote)
         crm_debug("EOF encoutered after %u bytes", remote->buffer_offset);
         return -ENOTCONN;
 
-    } else if (rc <= 0) {
+    } else {
         crm_debug("Error receiving message after %u bytes: %s (%d)",
-                  remote->buffer_offset, gnutls_strerror(rc), rc);
+                  remote->buffer_offset, pcmk_strerror(rc), rc);
         return -ENOTCONN;
     }