summaryrefslogtreecommitdiffstats
path: root/sm/server.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2009-11-02 18:47:11 +0100
committerMarcus Brinkmann <mb@g10code.com>2009-11-02 18:47:11 +0100
commit717c38381ad276cb453fefe401136b246f16d73a (patch)
tree9bcd2451f6c167f190a3266e3ae8135b7755e58e /sm/server.c
parent[scd] Memory leak fix. (diff)
downloadgnupg2-717c38381ad276cb453fefe401136b246f16d73a.tar.xz
gnupg2-717c38381ad276cb453fefe401136b246f16d73a.zip
agent/
2009-11-02 Marcus Brinkmann <marcus@g10code.de> * command.c (reset_notify): Take LINE arg and return error. (register_commands): Use assuan_handler_t type. common/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * get-passphrase.c (default_inq_cb, membuf_data_cb): Change return type to gpg_error_t. g10/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * server.c (reset_notify, input_notify, output_notify): Update to new assuan interface. (register_commands): Use assuan_handler_t. scd/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * command.c (reset_notify): Take LINE arg and return error. (register_commands): Use assuan_handler_t type. sm/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * server.c (reset_notify, input_notify, output_notify): Update to new assuan interface. (register_commands): Use assuan_handler_t. * call-agent.c (membuf_data_cb, default_inq_cb) (inq_ciphertext_cb, scd_serialno_status_cb) (scd_keypairinfo_status_cb, istrusted_status_cb) (learn_status_cb, learn_cb, keyinfo_status_cb): Return gpg_error_t.
Diffstat (limited to 'sm/server.c')
-rw-r--r--sm/server.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sm/server.c b/sm/server.c
index c2c4330dc..aaa4fd021 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -308,11 +308,13 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
}
-static void
-reset_notify (assuan_context_t ctx)
+static gpg_error_t
+reset_notify (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
+ (void) line;
+
gpgsm_release_certlist (ctrl->server_local->recplist);
gpgsm_release_certlist (ctrl->server_local->signerlist);
ctrl->server_local->recplist = NULL;
@@ -320,11 +322,12 @@ reset_notify (assuan_context_t ctx)
close_message_fd (ctrl);
assuan_close_input_fd (ctx);
assuan_close_output_fd (ctx);
+ return 0;
}
-static void
-input_notify (assuan_context_t ctx, const char *line)
+static gpg_error_t
+input_notify (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
@@ -339,10 +342,11 @@ input_notify (assuan_context_t ctx, const char *line)
;
else
ctrl->autodetect_encoding = 1;
+ return 0;
}
-static void
-output_notify (assuan_context_t ctx, const char *line)
+static gpg_error_t
+output_notify (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
@@ -352,6 +356,7 @@ output_notify (assuan_context_t ctx, const char *line)
ctrl->create_pem = 1;
else if (strstr (line, "--base64"))
ctrl->create_base64 = 1; /* just the raw output */
+ return 0;
}
@@ -1100,7 +1105,7 @@ register_commands (assuan_context_t ctx)
{
static struct {
const char *name;
- gpg_error_t (*handler)(assuan_context_t, char *line);
+ assuan_handler_t handler;
} table[] = {
{ "RECIPIENT", cmd_recipient },
{ "SIGNER", cmd_signer },