diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/assuan.h.in | 7 |
2 files changed, 9 insertions, 1 deletions
@@ -1,6 +1,9 @@ Noteworthy changes in version 2.4.2 (unreleased) [C7/A7/R_] ------------------------------------------------ + * The nPth version of the connect system hook does now wrap the call + with npth_unprotec/npth_protect to avoid blocking during a connect. + Noteworthy changes in version 2.4.1 (2015-11-23) [C7/A7/R1] ------------------------------------------------ diff --git a/src/assuan.h.in b/src/assuan.h.in index 67a1c20..da1af25 100644 --- a/src/assuan.h.in +++ b/src/assuan.h.in @@ -571,13 +571,18 @@ extern struct assuan_system_hooks _assuan_system_pth; { pid_t res; (void) ctx; npth_unprotect(); \ res = __assuan_waitpid (ctx, pid, nowait, status, options); \ npth_protect(); return res; } \ + static int _assuan_npth_connect (assuan_context_t ctx, int sock, \ + struct sockaddr *addr, socklen_t len)\ + { int res; npth_unprotect(); \ + res = __assuan_connect (ctx, sock, addr, len); \ + npth_protect(); return res; } \ \ struct assuan_system_hooks _assuan_system_npth = \ { ASSUAN_SYSTEM_HOOKS_VERSION, _assuan_npth_usleep, __assuan_pipe, \ __assuan_close, _assuan_npth_read, _assuan_npth_write, \ _assuan_npth_recvmsg, _assuan_npth_sendmsg, \ __assuan_spawn, _assuan_npth_waitpid, __assuan_socketpair, \ - __assuan_socket, __assuan_connect } + __assuan_socket, _assuan_npth_connect } extern struct assuan_system_hooks _assuan_system_npth; #define ASSUAN_SYSTEM_NPTH &_assuan_system_npth |