From: Juanma Barranquero Date: Wed, 13 Jul 2011 20:33:44 +0000 (+0200) Subject: src/gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059). X-Git-Tag: emacs-pretest-24.0.90~104^2~309 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ac389d0c75f29a4c5bdf05c7180cabd96a7ae7e6;p=emacs.git src/gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059). --- diff --git a/src/ChangeLog b/src/ChangeLog index 2721704223c..a045a7ddd21 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-07-13 Juanma Barranquero + + * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059). + 2011-07-13 Eli Zaretskii * buffer.c (mmap_find): Fix a typo. @@ -16,7 +20,7 @@ 2011-07-13 Paul Eggert - * 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 * character.c (Fcharacterp): Don't advertise optional ignored - argument. (Bug#4026) + argument. (Bug#4026) 2011-07-12 Lars Magne Ingebrigtsen @@ -240,7 +244,7 @@ (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. @@ -1918,7 +1922,7 @@ (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. @@ -2215,7 +2219,7 @@ * 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. diff --git a/src/gnutls.c b/src/gnutls.c index 76cfa5dcc98..3761951b866 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -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; }