From: discomfitor Date: Fri, 29 Oct 2010 04:31:16 +0000 (+0000) Subject: add a sweet DBG logging function for gnutls because logging info rules X-Git-Tag: build/2012-07-04.173327~1544 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c914e89e9d3ab60d3ad0a8f53e3ddf77b99a8a7;p=profile%2Fivi%2Fecore.git add a sweet DBG logging function for gnutls because logging info rules git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@53980 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_con/ecore_con_ssl.c b/src/lib/ecore_con/ecore_con_ssl.c index 7e64789..ce5c772 100644 --- a/src/lib/ecore_con/ecore_con_ssl.c +++ b/src/lib/ecore_con/ecore_con_ssl.c @@ -53,6 +53,13 @@ _gnutls_print_errors(int ret) } +static void +_gnutls_log_func(int level, const char *str) +{ + DBG("|<%d>| %s", level, str); +} + + static const char* SSL_GNUTLS_PRINT_HANDSHAKE_STATUS(gnutls_handshake_description_t status) { @@ -387,6 +394,8 @@ _ecore_con_ssl_init_gnutls(void) #endif if (gnutls_global_init()) return ECORE_CON_SSL_ERROR_INIT_FAILED; + gnutls_global_set_log_level(9); + gnutls_global_set_log_function(_gnutls_log_func); return ECORE_CON_SSL_ERROR_NONE; }