1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Use Assuan socket wrapper calls.

Made socket servers secure under Windows.
This commit is contained in:
Werner Koch 2007-10-01 14:48:39 +00:00
parent a6b11ea482
commit 31c19d1d68
46 changed files with 464 additions and 260 deletions

View file

@ -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)
{