Use GError instead of polution console with gnutls printouts. Fixes LM-126.
authorLeonid Evdokimov <leon@darkk.net.ru>
Thu, 28 Aug 2008 14:17:04 +0200
changeset 492 b5e859ab61a6
parent 489 e1defb50be65
child 494 c9bcbd4beb31
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:54:08 2008 +0200
+++ b/loudmouth/lm-ssl-gnutls.c	Thu Aug 28 14:17:04 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;
 	}