summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-17 00:49:20 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-17 00:49:20 +0200
commit750c33f71e7281e651f7315689f9085a1d0894d7 (patch)
treea473a0cd2af2f03d570a71bc6d3aa7650f80c84b
parenta80314570479945eb610a4f3f30fd6e82100195d (diff)
downloademacs-750c33f71e7281e651f7315689f9085a1d0894d7.tar.gz
Move the defintion of `gnutls-log-level' to the C level to avoid loading problems
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/net/gnutls.el5
-rw-r--r--src/ChangeLog3
-rw-r--r--src/gnutls.c16
4 files changed, 13 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 186917010ab..15f742ed91a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * net/gnutls.el (gnutls-log-level): Removed.
+
* textmodes/fill.el (adaptive-fill-regexp): Include EN DASH as an
indentation character (bug#6380).
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index edbf9a54afc..9cb071b185d 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -42,11 +42,6 @@
:prefix "gnutls-"
:group 'net-utils)
-(defcustom gnutls-log-level 0
- "Logging level to be used by `starttls-negotiate' and GnuTLS."
- :type 'integer
- :group 'gnutls)
-
(defcustom gnutls-algorithm-priority nil
"If non-nil, this should be a TLS priority string.
For instance, if you want to skip the \"dhe-rsa\" algorithm,
diff --git a/src/ChangeLog b/src/ChangeLog
index 961b3e0234a..27a375c978d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,6 +4,9 @@
2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
+ it's used from the C level.
+
* process.c: Use the same condition for POLL_FOR_INPUT in both
keyboard.c and process.c (bug#1858).
diff --git a/src/gnutls.c b/src/gnutls.c
index fdc0c13a53b..52e80a69ae5 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -35,7 +35,6 @@ static int
emacs_gnutls_handle_error (gnutls_session_t, int err);
static Lisp_Object Qgnutls_dll;
-static Lisp_Object Qgnutls_log_level;
static Lisp_Object Qgnutls_code;
static Lisp_Object Qgnutls_anon, Qgnutls_x509pki;
static Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again,
@@ -146,7 +145,6 @@ 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)))
@@ -195,8 +193,8 @@ init_gnutls_functions (Lisp_Object libraries)
LOAD_GNUTLS_FN (library, gnutls_x509_crt_import);
LOAD_GNUTLS_FN (library, gnutls_x509_crt_init);
- if (NUMBERP (gnutls_log_level))
- max_log_level = XINT (gnutls_log_level);
+ if (NUMBERP (Vgnutls_log_level))
+ max_log_level = XINT (Vgnutls_log_level);
GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
SDATA (Fget (Qgnutls_dll, QCloaded_from)));
@@ -399,7 +397,6 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, EMACS_INT nbyte)
static int
emacs_gnutls_handle_error (gnutls_session_t session, int err)
{
- Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
int max_log_level = 0;
int ret;
@@ -409,8 +406,8 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
if (err >= 0)
return 0;
- if (NUMBERP (gnutls_log_level))
- max_log_level = XINT (gnutls_log_level);
+ if (NUMBERP (Vgnutls_log_level))
+ max_log_level = XINT (Vgnutls_log_level);
/* TODO: use gnutls-error-fatalp and gnutls-error-string. */
@@ -1118,7 +1115,6 @@ syms_of_gnutls (void)
gnutls_global_initialized = 0;
DEFSYM (Qgnutls_dll, "gnutls");
- DEFSYM (Qgnutls_log_level, "gnutls-log-level");
DEFSYM (Qgnutls_code, "gnutls-code");
DEFSYM (Qgnutls_anon, "gnutls-anon");
DEFSYM (Qgnutls_x509pki, "gnutls-x509pki");
@@ -1158,6 +1154,10 @@ syms_of_gnutls (void)
defsubr (&Sgnutls_deinit);
defsubr (&Sgnutls_bye);
defsubr (&Sgnutls_available_p);
+
+ DEFVAR_INT ("gnutls-log-level", Vgnutls_log_level,
+ doc: /* Logging level used by the GnuTLS functions. */);
+ Vgnutls_log_level = make_number (0);
}
#endif /* HAVE_GNUTLS */