[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-32-g9691834
by NIIBE Yutaka
cvs at cvs.gnupg.org
Tue Mar 27 09:26:42 CEST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via 96918346beeca7a46de9f03f19502373994c21bc (commit)
from 02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 96918346beeca7a46de9f03f19502373994c21bc
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Mar 27 16:24:17 2018 +0900
agent,scd: Use pointer to represent HANDLE.
* agent/call-scd.c [HAVE_W32_SYSTEM] (start_scd): Format with %p.
* scd/command.c [HAVE_W32_SYSTEM] (option_handler): Use void *.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/agent/call-scd.c b/agent/call-scd.c
index cf61a35..16139fd 100644
--- a/agent/call-scd.c
+++ b/agent/call-scd.c
@@ -404,8 +404,8 @@ start_scd (ctrl_t ctrl)
char buf[100];
#ifdef HAVE_W32_SYSTEM
- snprintf (buf, sizeof buf, "OPTION event-signal=%lx",
- (unsigned long)get_agent_scd_notify_event ());
+ snprintf (buf, sizeof buf, "OPTION event-signal=%p",
+ get_agent_scd_notify_event ());
#else
snprintf (buf, sizeof buf, "OPTION event-signal=%d", SIGUSR2);
#endif
diff --git a/scd/command.c b/scd/command.c
index 7011518..66d9fb9 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -79,7 +79,7 @@ struct server_local_s
assuan_context_t assuan_ctx;
#ifdef HAVE_W32_SYSTEM
- unsigned long event_signal; /* Or 0 if not used. */
+ void *event_signal; /* Or NULL if not used. */
#else
int event_signal; /* Or 0 if not used. */
#endif
@@ -178,7 +178,11 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
#ifdef HAVE_W32_SYSTEM
if (!*value)
return gpg_error (GPG_ERR_ASS_PARAMETER);
- ctrl->server_local->event_signal = strtoul (value, NULL, 16);
+#ifdef _WIN64
+ ctrl->server_local->event_signal = (void *)strtoull (value, NULL, 16);
+#else
+ ctrl->server_local->event_signal = (void *)strtoul (value, NULL, 16);
+#endif
#else
int i = *value? atoi (value) : -1;
if (i < 0)
@@ -1933,20 +1937,20 @@ send_client_notifications (app_t app, int removal)
pid = assuan_get_pid (sl->assuan_ctx);
#ifdef HAVE_W32_SYSTEM
- handle = (void *)sl->event_signal;
+ handle = sl->event_signal;
for (kidx=0; kidx < killidx; kidx++)
if (killed[kidx].pid == pid
&& killed[kidx].handle == handle)
break;
if (kidx < killidx)
- log_info ("event %lx (%p) already triggered for client %d\n",
+ log_info ("event %p (%p) already triggered for client %d\n",
sl->event_signal, handle, (int)pid);
else
{
- log_info ("triggering event %lx (%p) for client %d\n",
+ log_info ("triggering event %p (%p) for client %d\n",
sl->event_signal, handle, (int)pid);
if (!SetEvent (handle))
- log_error ("SetEvent(%lx) failed: %s\n",
+ log_error ("SetEvent(%p) failed: %s\n",
sl->event_signal, w32_strerror (-1));
if (killidx < DIM (killed))
{
-----------------------------------------------------------------------
Summary of changes:
agent/call-scd.c | 4 ++--
scd/command.c | 16 ++++++++++------
2 files changed, 12 insertions(+), 8 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list