mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
gpg: Fix gpg --server mode on Windows.
* g10/server.c (cmd_encrypt): Don't translate_sys2libc_fd, since it requires HANDLE on Windows. (cmd_decrypt): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
577baf4af3
commit
f2dcd158a5
20
g10/server.c
20
g10/server.c
@ -265,7 +265,7 @@ cmd_encrypt (assuan_context_t ctx, char *line)
|
||||
{
|
||||
ctrl_t ctrl = assuan_get_pointer (ctx);
|
||||
gpg_error_t err;
|
||||
int inp_fd, out_fd;
|
||||
gnupg_fd_t inp_fd, out_fd;
|
||||
|
||||
(void)line; /* LINE is not used. */
|
||||
|
||||
@ -276,14 +276,14 @@ cmd_encrypt (assuan_context_t ctx, char *line)
|
||||
goto leave;
|
||||
}
|
||||
|
||||
inp_fd = translate_sys2libc_fd (assuan_get_input_fd (ctx), 0);
|
||||
if (inp_fd == -1)
|
||||
inp_fd = assuan_get_input_fd (ctx);
|
||||
if (inp_fd == GNUPG_INVALID_FD)
|
||||
{
|
||||
err = set_error (GPG_ERR_ASS_NO_INPUT, NULL);
|
||||
goto leave;
|
||||
}
|
||||
out_fd = translate_sys2libc_fd (assuan_get_output_fd (ctx), 1);
|
||||
if (out_fd == -1)
|
||||
out_fd = assuan_get_output_fd (ctx);
|
||||
if (out_fd == GNUPG_INVALID_FD)
|
||||
{
|
||||
err = set_error (GPG_ERR_ASS_NO_OUTPUT, NULL);
|
||||
goto leave;
|
||||
@ -327,15 +327,15 @@ cmd_decrypt (assuan_context_t ctx, char *line)
|
||||
{
|
||||
ctrl_t ctrl = assuan_get_pointer (ctx);
|
||||
gpg_error_t err;
|
||||
int inp_fd, out_fd;
|
||||
gnupg_fd_t inp_fd, out_fd;
|
||||
|
||||
(void)line; /* LINE is not used. */
|
||||
|
||||
inp_fd = translate_sys2libc_fd (assuan_get_input_fd (ctx), 0);
|
||||
if (inp_fd == -1)
|
||||
inp_fd = assuan_get_input_fd (ctx);
|
||||
if (inp_fd == GNUPG_INVALID_FD)
|
||||
return set_error (GPG_ERR_ASS_NO_INPUT, NULL);
|
||||
out_fd = translate_sys2libc_fd (assuan_get_output_fd (ctx), 1);
|
||||
if (out_fd == -1)
|
||||
out_fd = assuan_get_output_fd (ctx);
|
||||
if (out_fd == GNUPG_INVALID_FD)
|
||||
return set_error (GPG_ERR_ASS_NO_OUTPUT, NULL);
|
||||
|
||||
glo_ctrl.lasterr = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user