mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Fixed INPUT/OUTPUT command
This commit is contained in:
parent
bc11060de9
commit
717bc63ad2
@ -88,8 +88,9 @@ parse_cmd_input_output (ASSUAN_CONTEXT ctx, char *line, int *rfd)
|
|||||||
if (!digitp (*line))
|
if (!digitp (*line))
|
||||||
return set_error (ctx, Syntax_Error, "number required");
|
return set_error (ctx, Syntax_Error, "number required");
|
||||||
*rfd = strtoul (line, &endp, 10);
|
*rfd = strtoul (line, &endp, 10);
|
||||||
if (*endp)
|
/* remove that argument so that a notify handler won't see it */
|
||||||
return set_error (ctx, Syntax_Error, "garbage found");
|
memset (line, ' ', endp? (endp-line):strlen(line));
|
||||||
|
|
||||||
if (*rfd == ctx->inbound.fd)
|
if (*rfd == ctx->inbound.fd)
|
||||||
return set_error (ctx, Parameter_Conflict, "fd same as inbound fd");
|
return set_error (ctx, Parameter_Conflict, "fd same as inbound fd");
|
||||||
if (*rfd == ctx->outbound.fd)
|
if (*rfd == ctx->outbound.fd)
|
||||||
@ -381,7 +382,7 @@ process_request (ASSUAN_CONTEXT ctx)
|
|||||||
}
|
}
|
||||||
else if (rc == -1)
|
else if (rc == -1)
|
||||||
{ /* No error checking because the peer may have already disconnect */
|
{ /* No error checking because the peer may have already disconnect */
|
||||||
assuan_write_line (ctx, "OK Hope to meet you again");
|
assuan_write_line (ctx, "OK closing connection");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user