[Pkg-gnupg-commit] [libassuan] 02/11: Use wrapped __assuan_usleep for _assuan_npth_usleep.
Eric Dorland
eric at moszumanska.debian.org
Sat Dec 9 06:48:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit a627350eed5dc32bac41195462f27dee1987b0f5
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed Dec 6 19:56:34 2017 +0900
Use wrapped __assuan_usleep for _assuan_npth_usleep.
* src/assuan.h.in (_assuan_npth_usleep): Wrap __assuan_usleep.
--
Assuan should support system hooks for nPth before npth_init.
Before the call of npth_init, npth_unprotect and npth_protect do
nothing, whiile npth_usleep may crash.
No use of npth_usleep is better.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
src/assuan.h.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/assuan.h.in b/src/assuan.h.in
index f9eddca..9594e73 100644
--- a/src/assuan.h.in
+++ b/src/assuan.h.in
@@ -546,7 +546,9 @@ extern struct assuan_system_hooks _assuan_system_pth;
#define ASSUAN_SYSTEM_NPTH_IMPL \
static void _assuan_npth_usleep (assuan_context_t ctx, unsigned int usec) \
- { (void) ctx; npth_usleep (usec); } \
+ { ssize_t res; (void) ctx; npth_unprotect(); \
+ res = __assuan_usleep (ctx, usec); \
+ npth_protect(); } \
static ssize_t _assuan_npth_read (assuan_context_t ctx, assuan_fd_t fd, \
void *buffer, size_t size) \
{ ssize_t res; (void) ctx; npth_unprotect(); \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list