2009-11-25  Marcus Brinkmann  <marcus@g10code.de>

	* command.c (start_command_handler): Use assuan_fd_t and
	assuan_fdopen on fds.

scd/
2009-11-25  Marcus Brinkmann  <marcus@g10code.de>

	* command.c (scd_command_handler): Use assuan_fd_t and
	assuan_fdopen on fds.

sm/
2009-11-25  Marcus Brinkmann  <marcus@g10code.de>

	* server.c (gpgsm_server): Use assuan_fd_t and assuan_fdopen on
	fds.

g10/
2009-11-25  Marcus Brinkmann  <marcus@g10code.de>

	* server.c (gpg_server): Use assuan_fd_t and assuan_fdopen on fds.
This commit is contained in:
Marcus Brinkmann 2009-11-25 17:58:26 +00:00
parent cf2ec5673f
commit 18bdcc0881
9 changed files with 33 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2009-11-25 Marcus Brinkmann <marcus@g10code.de>
* command.c (start_command_handler): Use assuan_fd_t and
assuan_fdopen on fds.
2009-11-05 Marcus Brinkmann <marcus@g10code.de> 2009-11-05 Marcus Brinkmann <marcus@g10code.de>
* call-pinentry.c (start_pinentry): Call assuan_pipe_connect, not * call-pinentry.c (start_pinentry): Call assuan_pipe_connect, not

View File

@ -1916,10 +1916,10 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd)
if (listen_fd == GNUPG_INVALID_FD && fd == GNUPG_INVALID_FD) if (listen_fd == GNUPG_INVALID_FD && fd == GNUPG_INVALID_FD)
{ {
int filedes[2]; assuan_fd_t filedes[2];
filedes[0] = 0; filedes[0] = assuan_fdopen (0);
filedes[1] = 1; filedes[1] = assuan_fdopen (1);
rc = assuan_init_pipe_server (ctx, filedes); rc = assuan_init_pipe_server (ctx, filedes);
} }
else if (listen_fd != GNUPG_INVALID_FD) else if (listen_fd != GNUPG_INVALID_FD)

View File

@ -1,3 +1,7 @@
2009-11-25 Marcus Brinkmann <marcus@g10code.de>
* server.c (gpg_server): Use assuan_fd_t and assuan_fdopen on fds.
2009-11-23 Werner Koch <wk@g10code.com> 2009-11-23 Werner Koch <wk@g10code.com>
* gpg.c (gpgconf_list): Add key "default_pubkey_algo". * gpg.c (gpgconf_list): Add key "default_pubkey_algo".

View File

@ -658,8 +658,8 @@ gpg_server (ctrl_t ctrl)
/* We use a pipe based server so that we can work from scripts. /* We use a pipe based server so that we can work from scripts.
assuan_init_pipe_server will automagically detect when we are assuan_init_pipe_server will automagically detect when we are
called with a socketpair and ignore FILEDES in this case. */ called with a socketpair and ignore FILEDES in this case. */
filedes[0] = 0; filedes[0] = assuan_fdopen (0);
filedes[1] = 1; filedes[1] = assuan_fdopen (1);
rc = assuan_new (&ctx); rc = assuan_new (&ctx);
if (rc) if (rc)
{ {

View File

@ -574,7 +574,7 @@ gpg_error_t
g13_server (ctrl_t ctrl) g13_server (ctrl_t ctrl)
{ {
gpg_error_t err; gpg_error_t err;
int filedes[2]; assuan_fd_t filedes[2];
assuan_context_t ctx = NULL; assuan_context_t ctx = NULL;
static const char hello[] = ("GNU Privacy Guard's G13 server " static const char hello[] = ("GNU Privacy Guard's G13 server "
PACKAGE_VERSION " ready"); PACKAGE_VERSION " ready");
@ -582,8 +582,8 @@ g13_server (ctrl_t ctrl)
/* We use a pipe based server so that we can work from scripts. /* We use a pipe based server so that we can work from scripts.
assuan_init_pipe_server will automagically detect when we are assuan_init_pipe_server will automagically detect when we are
called with a socketpair and ignore FIELDES in this case. */ called with a socketpair and ignore FIELDES in this case. */
filedes[0] = 0; filedes[0] = assuan_fdopen (0);
filedes[1] = 1; filedes[1] = assuan_fdopen (1);
err = assuan_new (&ctx); err = assuan_new (&ctx);
if (err) if (err)
{ {

View File

@ -1,3 +1,8 @@
2009-11-25 Marcus Brinkmann <marcus@g10code.de>
* command.c (scd_command_handler): Use assuan_fd_t and
assuan_fdopen on fds.
2009-11-05 Marcus Brinkmann <marcus@g10code.de> 2009-11-05 Marcus Brinkmann <marcus@g10code.de>
* command.c (scd_command_handler): Call assuan_init_socket_server, * command.c (scd_command_handler): Call assuan_init_socket_server,

View File

@ -1913,10 +1913,10 @@ scd_command_handler (ctrl_t ctrl, int fd)
if (fd == -1) if (fd == -1)
{ {
int filedes[2]; assuan_fd_t filedes[2];
filedes[0] = 0; filedes[0] = assuan_fdopen (0);
filedes[1] = 1; filedes[1] = assuan_fdopen (1);
rc = assuan_init_pipe_server (ctx, filedes); rc = assuan_init_pipe_server (ctx, filedes);
} }
else else

View File

@ -1,3 +1,8 @@
2009-11-25 Marcus Brinkmann <marcus@g10code.de>
* server.c (gpgsm_server): Use assuan_fd_t and assuan_fdopen on
fds.
2009-11-23 Werner Koch <wk@g10code.com> 2009-11-23 Werner Koch <wk@g10code.com>
* gpgsm.c (main) <aGpgConfList>: Add key "default_pubkey_algo". * gpgsm.c (main) <aGpgConfList>: Add key "default_pubkey_algo".

View File

@ -1205,7 +1205,7 @@ void
gpgsm_server (certlist_t default_recplist) gpgsm_server (certlist_t default_recplist)
{ {
int rc; int rc;
int filedes[2]; assuan_fd_t filedes[2];
assuan_context_t ctx; assuan_context_t ctx;
struct server_control_s ctrl; struct server_control_s ctrl;
static const char hello[] = ("GNU Privacy Guard's S/M server " static const char hello[] = ("GNU Privacy Guard's S/M server "
@ -1217,8 +1217,8 @@ gpgsm_server (certlist_t default_recplist)
/* We use a pipe based server so that we can work from scripts. /* We use a pipe based server so that we can work from scripts.
assuan_init_pipe_server will automagically detect when we are assuan_init_pipe_server will automagically detect when we are
called with a socketpair and ignore FIELDES in this case. */ called with a socketpair and ignore FIELDES in this case. */
filedes[0] = 0; filedes[0] = assuan_fdopen (0);
filedes[1] = 1; filedes[1] = assuan_fdopen (1);
rc = assuan_new (&ctx); rc = assuan_new (&ctx);
if (rc) if (rc)
{ {