diff options
author | NIIBE Yutaka <[email protected]> | 2023-03-20 01:13:24 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-03-20 01:13:24 +0000 |
commit | e57c072ea604671ca2d0a309bb75559c6d040043 (patch) | |
tree | 94d7c94743fd7ec652c594c66877aa8094a77185 | |
parent | agent: Fix diverting to TKDaemon. (diff) | |
download | gnupg-e57c072ea604671ca2d0a309bb75559c6d040043.tar.gz gnupg-e57c072ea604671ca2d0a309bb75559c6d040043.zip |
tkd: Add RESTART command.
It will be useful, when TKDaemon will maintain a context for a
connection.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | tkd/command.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tkd/command.c b/tkd/command.c index 5249dfa64..a78ede3b7 100644 --- a/tkd/command.c +++ b/tkd/command.c @@ -230,6 +230,25 @@ cmd_getinfo (assuan_context_t ctx, char *line) } +static const char hlp_restart[] = + "RESTART\n" + "\n" + "Restart the current connection.\n" + "\n" + "This is used by gpg-agent to reuse a primary pipe connection."; +/* + * TKDeamon does not have a context for a connection (for now). + * So, this command does nothing. + */ +static gpg_error_t +cmd_restart (assuan_context_t ctx, char *line) +{ + (void)line; + (void)ctx; + return 0; +} + + /* SLOTLIST command * A command to (re)scan for available keys, something like SERIALNO * command of scdaemon. @@ -451,6 +470,7 @@ register_commands (assuan_context_t ctx) { "KILLTKD", cmd_killtkd, hlp_killtkd }, { "KEYINFO", cmd_keyinfo, hlp_keyinfo }, { "GETINFO", cmd_getinfo, hlp_getinfo }, + { "RESTART", cmd_restart, hlp_restart }, { NULL } }; int i, rc; |