summaryrefslogtreecommitdiffstats
path: root/sm/server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-01-20 17:49:46 +0100
committerWerner Koch <wk@gnupg.org>2002-01-20 17:49:46 +0100
commitc3885e09957be7f844e606284da4a39e135f2343 (patch)
tree7df0da592cb8b8c18402a6b53ba84e49b1f89554 /sm/server.c
parent* assuan.h: Added Invalid Option error code. (diff)
downloadgnupg2-c3885e09957be7f844e606284da4a39e135f2343.tar.xz
gnupg2-c3885e09957be7f844e606284da4a39e135f2343.zip
* server.c (option_handler): New.
(gpgsm_server): Register it with assuan.
Diffstat (limited to 'sm/server.c')
-rw-r--r--sm/server.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sm/server.c b/sm/server.c
index 1ab7fc5d4..e05f5da0b 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -53,6 +53,17 @@ close_message_fd (CTRL ctrl)
}
}
+
+static int
+option_handler (ASSUAN_CONTEXT ctx, const char *key, const char *value)
+{
+ log_debug ("got option key=`%s' value=`%s'\n", key, value);
+ return 0;
+}
+
+
+
+
static void
reset_notify (ASSUAN_CONTEXT ctx)
{
@@ -472,6 +483,7 @@ gpgsm_server (void)
assuan_register_reset_notify (ctx, reset_notify);
assuan_register_input_notify (ctx, input_notify);
assuan_register_output_notify (ctx, output_notify);
+ assuan_register_option_handler (ctx, option_handler);
assuan_set_pointer (ctx, &ctrl);
ctrl.server_local = xcalloc (1, sizeof *ctrl.server_local);