mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
agent: Recover support CHECK_OWN_SOCKET_INTERVAL == 0.
* agent/gpg-agent.c (handle_connections): Only spawn the thread when CHECK_OWN_SOCKET_INTERVAL > 0. [CHECK_OWN_SOCKET_INTERVAL == 0] (check_own_socket_pid_cb) (do_check_own_socket, check_own_socket_thread): Ifdef out. -- GnuPG-bug-id: 6692 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
b2826924ee
commit
76896e2339
@ -529,8 +529,9 @@ static void handle_connections (gnupg_fd_t listen_fd,
|
|||||||
gnupg_fd_t listen_fd_browser,
|
gnupg_fd_t listen_fd_browser,
|
||||||
gnupg_fd_t listen_fd_ssh);
|
gnupg_fd_t listen_fd_ssh);
|
||||||
static int check_for_running_agent (int silent);
|
static int check_for_running_agent (int silent);
|
||||||
|
#if CHECK_OWN_SOCKET_INTERVAL > 0
|
||||||
static void *check_own_socket_thread (void *arg);
|
static void *check_own_socket_thread (void *arg);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Functions.
|
Functions.
|
||||||
@ -3086,6 +3087,7 @@ handle_connections (gnupg_fd_t listen_fd,
|
|||||||
else
|
else
|
||||||
have_homedir_inotify = 1;
|
have_homedir_inotify = 1;
|
||||||
|
|
||||||
|
#if CHECK_OWN_SOCKET_INTERVAL > 0
|
||||||
if (!disable_check_own_socket)
|
if (!disable_check_own_socket)
|
||||||
{
|
{
|
||||||
npth_t thread;
|
npth_t thread;
|
||||||
@ -3094,6 +3096,7 @@ handle_connections (gnupg_fd_t listen_fd,
|
|||||||
if (err)
|
if (err)
|
||||||
log_error ("error spawning check_own_socket_thread: %s\n", strerror (err));
|
log_error ("error spawning check_own_socket_thread: %s\n", strerror (err));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* On Windows we need to fire up a separate thread to listen for
|
/* On Windows we need to fire up a separate thread to listen for
|
||||||
requests from Putty (an SSH client), so we can replace Putty's
|
requests from Putty (an SSH client), so we can replace Putty's
|
||||||
@ -3353,7 +3356,7 @@ handle_connections (gnupg_fd_t listen_fd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if CHECK_OWN_SOCKET_INTERVAL > 0
|
||||||
/* Helper for check_own_socket. */
|
/* Helper for check_own_socket. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
check_own_socket_pid_cb (void *opaque, const void *buffer, size_t length)
|
check_own_socket_pid_cb (void *opaque, const void *buffer, size_t length)
|
||||||
@ -3445,7 +3448,7 @@ check_own_socket_thread (void *arg)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Figure out whether an agent is available and running. Prints an
|
/* Figure out whether an agent is available and running. Prints an
|
||||||
error if not. If SILENT is true, no messages are printed.
|
error if not. If SILENT is true, no messages are printed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user