bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9059: 24.0.50; Logging in init_gnutls_functions does not adhere to g


From: Juanma Barranquero
Subject: bug#9059: 24.0.50; Logging in init_gnutls_functions does not adhere to gnutls_log_level
Date: Wed, 13 Jul 2011 18:58:24 +0200

On Wed, Jul 13, 2011 at 18:31, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> Juanma, you did the Windows parts of gnutls.c, so could you look at
> this?

Would the following patch be enough?

    Juanma


=== modified file 'src/gnutls.c'
--- src/gnutls.c        2011-07-05 09:51:56 +0000
+++ src/gnutls.c        2011-07-13 16:51:53 +0000
@@ -143,10 +143,12 @@
 init_gnutls_functions (Lisp_Object libraries)
 {
   HMODULE library;
+  Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
+  int max_log_level = 1;

   if (!(library = w32_delayed_load (libraries, Qgnutls_dll)))
     {
-      GNUTLS_LOG (1, 1, "GnuTLS library not found");
+      GNUTLS_LOG (1, max_log_level, "GnuTLS library not found");
       return 0;
     }

@@ -189,7 +191,10 @@
   LOAD_GNUTLS_FN (library, gnutls_x509_crt_import);
   LOAD_GNUTLS_FN (library, gnutls_x509_crt_init);

-  GNUTLS_LOG2 (1, 1, "GnuTLS library loaded:",
+  if (NUMBERP (gnutls_log_level))
+    max_log_level = XINT (gnutls_log_level);
+
+  GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
                SDATA (Fget (Qgnutls_dll, QCloaded_from)));
   return 1;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]