src/gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
authorJuanma Barranquero <lekktu@gmail.com>
Wed, 13 Jul 2011 20:33:44 +0000 (22:33 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Wed, 13 Jul 2011 20:33:44 +0000 (22:33 +0200)
src/ChangeLog
src/gnutls.c

index 2721704..a045a7d 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-13  Juanma Barranquero  <lekktu@gmail.com>
+
+       * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
+
 2011-07-13  Eli Zaretskii  <eliz@gnu.org>
 
        * buffer.c (mmap_find): Fix a typo.
@@ -16,7 +20,7 @@
 
 2011-07-13  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.
+       * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
        The old code sometimes used this field without initializing it.
 
        * alloc.c (gc_sweep): Don't read past end of array.
@@ -26,7 +30,7 @@
 2011-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 
        * character.c (Fcharacterp): Don't advertise optional ignored
-       argument. (Bug#4026)
+       argument.  (Bug#4026)
 
 2011-07-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        (char_table_ascii): Uncompress the compressed values.
        (sub_char_table_ref): New arg is_uniprop.  Callers changed.
        Uncompress the compressed values.
-       (sub_char_table_ref_and_range):  Likewise.
+       (sub_char_table_ref_and_range): Likewise.
        (char_table_ref_and_range): Uncompress the compressed values.
        (sub_char_table_set): New arg is_uniprop.  Callers changed.
        Uncompress the compressed values.
        (xpm_put_color_table_h):
        * lisp.h (struct Lisp_Hash_Table):
        * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
-       * print.c (print):  Use 'EMACS_UINT' and 'EMACS_INT'
+       * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
        for hashes and hash indexes, instead of 'unsigned' and 'int'.
        * alloc.c (allocate_vectorlike):
        Check for overflow in vector size calculations.
 
        * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
        for fringe update if it has periodic bitmap.
-       (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
+       (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
        and fringe_bitmap_periodic_p.
 
        * fringe.c (get_fringe_bitmap_data): New function.
index 76cfa5d..3761951 100644 (file)
@@ -143,10 +143,12 @@ static int
 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 @@ init_gnutls_functions (Lisp_Object libraries)
   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;
 }