* server.c (option_handler): New.

(gpgsm_server): Register it with assuan.
This commit is contained in:
Werner Koch 2002-01-20 16:49:46 +00:00
parent a2fd247cf2
commit c3885e0995
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-01-20 Werner Koch <wk@gnupg.org>
* server.c (option_handler): New.
(gpgsm_server): Register it with assuan.
2002-01-19 Werner Koch <wk@gnupg.org>
* server.c (gpgsm_server): Use assuan_deinit_server and setup

View File

@ -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);