aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-10-01 14:48:39 +0000
committerWerner Koch <[email protected]>2007-10-01 14:48:39 +0000
commit31c19d1d685b75377d9ff6dfbc9138ecbd5600b4 (patch)
treef6630bee0deef3ff050b3ca7dbb55e4951e34372 /agent/command.c
parentSupport the SETQUALITYBAR command of recent pinentries. (diff)
downloadgnupg-31c19d1d685b75377d9ff6dfbc9138ecbd5600b4.tar.gz
gnupg-31c19d1d685b75377d9ff6dfbc9138ecbd5600b4.zip
Use Assuan socket wrapper calls.
Made socket servers secure under Windows.
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/agent/command.c b/agent/command.c
index 431639b1c..b816fac3e 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1544,12 +1544,12 @@ register_commands (assuan_context_t ctx)
control structure for this connection; it has only the basic
intialization. */
void
-start_command_handler (ctrl_t ctrl, int listen_fd, int fd)
+start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd)
{
int rc;
assuan_context_t ctx;
- if (listen_fd == -1 && fd == -1)
+ if (listen_fd == GNUPG_INVALID_FD && fd == GNUPG_INVALID_FD)
{
int filedes[2];
@@ -1557,14 +1557,13 @@ start_command_handler (ctrl_t ctrl, int listen_fd, int fd)
filedes[1] = 1;
rc = assuan_init_pipe_server (&ctx, filedes);
}
- else if (listen_fd != -1)
+ else if (listen_fd != GNUPG_INVALID_FD)
{
rc = assuan_init_socket_server_ext (&ctx, listen_fd, 0);
}
else
{
rc = assuan_init_socket_server_ext (&ctx, fd, 2);
- ctrl->connection_fd = fd;
}
if (rc)
{