diff options
author | Marcus Brinkmann <[email protected]> | 2002-04-24 22:08:35 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2002-04-24 22:08:35 +0000 |
commit | 898dda02e48dc6a0b80b0fd615fc4e51c239db9b (patch) | |
tree | c44393feb10c17a7723ec60b934d3416f5aac385 /sm/server.c | |
parent | 2002-04-24 Marcus Brinkmann <[email protected]> (diff) | |
download | gnupg-898dda02e48dc6a0b80b0fd615fc4e51c239db9b.tar.gz gnupg-898dda02e48dc6a0b80b0fd615fc4e51c239db9b.zip |
2002-04-25 Marcus Brinkmann <[email protected]>
* server.c (option_handler): Accept display, ttyname, ttytype,
lc_ctype and lc_messages options.
* gpgsm.c (main): Allocate memory for these options.
* gpgsm.h (struct opt): Make corresponding members non-const.
Diffstat (limited to 'sm/server.c')
-rw-r--r-- | sm/server.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sm/server.c b/sm/server.c index 13af393ba..54558ed8d 100644 --- a/sm/server.c +++ b/sm/server.c @@ -104,6 +104,46 @@ option_handler (ASSUAN_CONTEXT ctx, const char *key, const char *value) return ASSUAN_Parameter_Error; ctrl->include_certs = i; } + else if (!strcmp (key, "display")) + { + if (opt.display) + free (opt.display); + opt.display = strdup (value); + if (!opt.display) + return ASSUAN_Out_Of_Core; + } + else if (!strcmp (key, "ttyname")) + { + if (opt.ttyname) + free (opt.ttyname); + opt.ttyname = strdup (value); + if (!opt.ttyname) + return ASSUAN_Out_Of_Core; + } + else if (!strcmp (key, "ttytype")) + { + if (opt.ttytype) + free (opt.ttytype); + opt.ttytype = strdup (value); + if (!opt.ttytype) + return ASSUAN_Out_Of_Core; + } + else if (!strcmp (key, "lc-ctype")) + { + if (opt.lc_ctype) + free (opt.lc_ctype); + opt.lc_ctype = strdup (value); + if (!opt.lc_ctype) + return ASSUAN_Out_Of_Core; + } + else if (!strcmp (key, "lc-messages")) + { + if (opt.lc_messages) + free (opt.lc_messages); + opt.lc_messages = strdup (value); + if (!opt.lc_messages) + return ASSUAN_Out_Of_Core; + } else return ASSUAN_Invalid_Option; |