aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyserver.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-04-16 15:19:35 +0000
committerDavid Shaw <[email protected]>2004-04-16 15:19:35 +0000
commit0a17966a21d9ab55cd4c5169bf23f5eccb4c0b23 (patch)
treefbcdb04293fad3e935e6eb34038e9b22669853a8 /g10/keyserver.c
parent* main.h, misc.c (argsplit): Refactor argsep into argsplit and argsep so (diff)
downloadgnupg-0a17966a21d9ab55cd4c5169bf23f5eccb4c0b23.tar.gz
gnupg-0a17966a21d9ab55cd4c5169bf23f5eccb4c0b23.zip
* main.h, misc.c (optsep, argsplit, optlen, parse_options): Simplify code
and properly handle a partial match against an option with an argument. * keyserver-internal.h, keyserver.c (parse_keyserver_options): Use new optsep and argsplit functions.
Diffstat (limited to '')
-rw-r--r--g10/keyserver.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c
index c4c43b87b..e7c4c93a3 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -70,12 +70,13 @@ static struct parse_options keyserver_opts[]=
static int keyserver_work(int action,STRLIST list,
KEYDB_SEARCH_DESC *desc,int count);
-void
+int
parse_keyserver_options(char *options)
{
- char *tok,*arg;
+ int ret=1;
+ char *tok;
- while((tok=argsep(&options,&arg)))
+ while((tok=optsep(&options)))
{
if(tok[0]=='\0')
continue;
@@ -108,6 +109,7 @@ parse_keyserver_options(char *options)
{
/* All of the standard options have failed, so the option is
destined for a keyserver plugin. */
+ char *arg=argsplit(tok);
if(arg)
{
@@ -126,6 +128,8 @@ parse_keyserver_options(char *options)
add_to_strlist(&opt.keyserver_options.other,tok);
}
}
+
+ return ret;
}
struct keyserver_spec *