Use GError instead of polution console with gnutls printouts. Fixes LM-126.
authorLeonid Evdokimov <leon@darkk.net.ru>
Thu, 28 Aug 2008 14:18:28 +0200
changeset 493 978fac7d28d2
parent 491 3915d6e6ebc6
child 495 d377df7aa476
Use GError instead of polution console with gnutls printouts. Fixes LM-126. Patch from Leonid Evdokimov. committer: Mikael Hallendal <micke@imendio.com>
loudmouth/lm-ssl-gnutls.c
--- a/loudmouth/lm-ssl-gnutls.c	Thu Aug 28 13:58:48 2008 +0200
+++ b/loudmouth/lm-ssl-gnutls.c	Thu Aug 28 14:18:28 2008 +0200
@@ -223,17 +223,16 @@
 	if (ret < 0 || !auth_ok) {
 		char *errmsg;
 
-		gnutls_perror (ret);
-	
 		if (!auth_ok) {
-			errmsg = "*** GNUTLS authentication error";
+			errmsg = "authentication error";
 		} else {
-			errmsg = "*** GNUTLS handshake failed";
+			errmsg = "handshake failed";
 		}
 
 		g_set_error (error, 
 			     LM_ERROR, LM_ERROR_CONNECTION_OPEN,
-			     errmsg);			
+                             "*** GNUTLS %s: %s",
+			     errmsg, gnutls_strerror (ret));			
 
 		return FALSE;
 	}