summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/assuan.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/assuan.c b/src/assuan.c
index 772e892..6fb7ba6 100644
--- a/src/assuan.c
+++ b/src/assuan.c
@@ -120,6 +120,11 @@ _assuan_pre_syscall (void)
{
if (pre_syscall_func)
pre_syscall_func ();
+ else if (!_assuan_syscall_func_initialized)
+ {
+ gpgrt_get_syscall_clamp (&pre_syscall_func, &post_syscall_func);
+ _assuan_syscall_func_initialized = 1;
+ }
}
@@ -141,12 +146,6 @@ assuan_new_ext (assuan_context_t *r_ctx, gpg_err_source_t err_source,
struct assuan_context_s wctx;
assuan_context_t ctx;
- if (!_assuan_syscall_func_initialized)
- {
- gpgrt_get_syscall_clamp (&pre_syscall_func, &post_syscall_func);
- _assuan_syscall_func_initialized = 1;
- }
-
/* Set up a working context so we can use standard functions. */
memset (&wctx, 0, sizeof (wctx));
wctx.err_source = err_source;