[Pkg-gnupg-commit] [gnupg2] 183/241: dirmngr: Let Libassuan employ nPth wrappers for connect.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 9 20:32:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit f95cff1cc9e7a4d9f6b7c45188ec47e70f9874dc
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 26 17:15:08 2015 +0100

    dirmngr: Let Libassuan employ nPth wrappers for connect.
    
    * dirmngr/http.c (my_unprotect, my_protect): Remove.
    (connect_server): Do not use these wrappers.
    --
    
    Since Libassuan version 2.4.2 the macro ASSUAN_SYSTEM_NPTH_IMPL
    protects the low-level connect calls with npth_unprotect and
    npth_protect.  This is better than the high-level kludge we used here.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 dirmngr/http.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/dirmngr/http.c b/dirmngr/http.c
index 60dc45f..02854e4 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -105,13 +105,9 @@
 #ifdef USE_NPTH
 # define my_select(a,b,c,d,e)  npth_select ((a), (b), (c), (d), (e))
 # define my_accept(a,b,c)      npth_accept ((a), (b), (c))
-# define my_unprotect()        npth_unprotect ()
-# define my_protect()          npth_protect ()
 #else
 # define my_select(a,b,c,d,e)  select ((a), (b), (c), (d), (e))
 # define my_accept(a,b,c)      accept ((a), (b), (c))
-# define my_unprotect()        do { } while(0)
-# define my_protect()          do { } while(0)
 #endif
 
 #ifdef HAVE_W32_SYSTEM
@@ -2228,11 +2224,8 @@ connect_server (const char *server, unsigned short port,
     {
 #ifdef ASSUAN_SOCK_TOR
 
-      my_unprotect ();
       sock = assuan_sock_connect_byname (server, port, 0, NULL,
                                          ASSUAN_SOCK_TOR);
-      my_protect ();
-
       if (sock == ASSUAN_INVALID_FD)
         {
           if (errno == EHOSTUNREACH)
@@ -2327,9 +2320,7 @@ connect_server (const char *server, unsigned short port,
             }
 
           anyhostaddr = 1;
-          my_unprotect ();
           ret = assuan_sock_connect (sock, ai->addr, ai->addrlen);
-          my_protect ();
           if (ret)
             last_errno = errno;
           else

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list