Use GError instead of polution console with gnutls printouts. Fixes LM-126.
Patch from Leonid Evdokimov.
committer: Mikael Hallendal <micke@imendio.com>
--- 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;
}