From: Juanma Barranquero Date: Thu, 3 Nov 2022 13:41:28 +0000 (+0100) Subject: * src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities. X-Git-Tag: emacs-29.0.90~1616^2~333 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b8038494ce8354a3e2cfffebba40dbd1328ebb9;p=emacs.git * src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities. --- diff --git a/src/gnutls.c b/src/gnutls.c index a0de0238c47..7f0aaf85a41 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -2790,6 +2790,10 @@ Any GnuTLS extension with ID up to 100 capabilities = Fcons (intern("gnutls"), capabilities); +# ifdef HAVE_GNUTLS_EXT__DUMBFW + capabilities = Fcons (intern("ClientHello Padding"), capabilities); +# endif + # ifdef HAVE_GNUTLS3 capabilities = Fcons (intern("gnutls3"), capabilities); capabilities = Fcons (intern("digests"), capabilities); @@ -2807,16 +2811,14 @@ Any GnuTLS extension with ID up to 100 const char* name = gnutls_ext_get_name(ext); if (name != NULL) { - capabilities = Fcons (intern(name), capabilities); + Lisp_Object cap = intern (name); + if (NILP (Fmemq (cap, capabilities))) + capabilities = Fcons (cap, capabilities); } } # endif # endif /* HAVE_GNUTLS3 */ -# ifdef HAVE_GNUTLS_EXT__DUMBFW - capabilities = Fcons (intern("ClientHello Padding"), capabilities); -# endif - # ifdef WINDOWSNT Vlibrary_cache = Fcons (Fcons (Qgnutls, capabilities), Vlibrary_cache); # endif /* WINDOWSNT */