aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-06-03 14:31:58 +0000
committerWerner Koch <[email protected]>2019-06-03 14:33:50 +0000
commitf3251023750d6bd9023dbb8373c804d7d4540a56 (patch)
tree08754029fdb3407b41fb54d84acfff00e7830b7a /agent/command.c
parentdoc/wks.texi: fix typo (diff)
downloadgnupg-f3251023750d6bd9023dbb8373c804d7d4540a56.tar.gz
gnupg-f3251023750d6bd9023dbb8373c804d7d4540a56.zip
Return better error code for some getinfo IPC commands.
* agent/command.c (cmd_getinfo): Return GPG_ERR_FALSE as boolean False. * g13/server.c (cmd_getinfo): Ditto. * sm/server.c (cmd_getinfo): Ditto. -- GPG_ERR_FALSE was introduced with libgpg-error 1.21 and we now require a later version for gnupg 2. Thus we can switch to this more descriptive code. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/agent/command.c b/agent/command.c
index 392c3783a..c24fc80fd 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -2887,7 +2887,7 @@ cmd_getinfo (assuan_context_t ctx, char *line)
{
cmdopt = line;
if (!command_has_option (cmd, cmdopt))
- rc = gpg_error (GPG_ERR_GENERAL);
+ rc = gpg_error (GPG_ERR_FALSE);
}
}
}
@@ -2901,7 +2901,7 @@ cmd_getinfo (assuan_context_t ctx, char *line)
}
else if (!strcmp (line, "restricted"))
{
- rc = ctrl->restricted? 0 : gpg_error (GPG_ERR_GENERAL);
+ rc = ctrl->restricted? 0 : gpg_error (GPG_ERR_FALSE);
}
else if (ctrl->restricted)
{
@@ -2935,7 +2935,7 @@ cmd_getinfo (assuan_context_t ctx, char *line)
}
else if (!strcmp (line, "scd_running"))
{
- rc = agent_scd_check_running ()? 0 : gpg_error (GPG_ERR_GENERAL);
+ rc = agent_scd_check_running ()? 0 : gpg_error (GPG_ERR_FALSE);
}
else if (!strcmp (line, "std_env_names"))
{