From 24a34eea6172932cbae849bc43989662354e25b5 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Thu, 17 Mar 2005 23:16:41 +0000 Subject: [PATCH] * ksutil.c (parse_ks_options): Handle verbose=nnn. * Makefile.am: Calculate GNUPG_LIBEXECDIR directly. Do not redefine $libexecdir. --- keyserver/ChangeLog | 5 +++++ keyserver/Makefile.am | 9 +++++---- keyserver/ksutil.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog index e95067c8d..e27e9e8ca 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog @@ -1,5 +1,10 @@ 2005-03-17 David Shaw + * ksutil.c (parse_ks_options): Handle verbose=nnn. + + * Makefile.am: Calculate GNUPG_LIBEXECDIR directly. Do not + redefine $libexecdir. + * gpgkeys_curl.c, gpgkeys_finger.c, gpgkeys_ldap.c: Start using parse_ks_options and remove a lot of common code. diff --git a/keyserver/Makefile.am b/keyserver/Makefile.am index 0b045e42d..7d328b2f1 100644 --- a/keyserver/Makefile.am +++ b/keyserver/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. # # This file is part of GnuPG. # @@ -21,10 +21,11 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl EXTRA_PROGRAMS = gpgkeys_ldap gpgkeys_hkp gpgkeys_http gpgkeys_finger gpgkeys_curl EXTRA_SCRIPTS = gpgkeys_mailto -libexecdir = @libexecdir@/@PACKAGE@ -libexec_PROGRAMS = @GPGKEYS_LDAP@ @GPGKEYS_HKP@ @GPGKEYS_FINGER@ @GPGKEYS_HTTP@ @GPGKEYS_CURL@ -libexec_SCRIPTS = @GPGKEYS_MAILTO@ +gpglibexecdir = $(libexecdir)/@PACKAGE@ + +gpglibexec_PROGRAMS = @GPGKEYS_LDAP@ @GPGKEYS_HKP@ @GPGKEYS_FINGER@ @GPGKEYS_HTTP@ @GPGKEYS_CURL@ +gpglibexec_SCRIPTS = @GPGKEYS_MAILTO@ noinst_SCRIPTS = gpgkeys_test gpgkeys_ldap_SOURCES = gpgkeys_ldap.c ksutil.c ksutil.h diff --git a/keyserver/ksutil.c b/keyserver/ksutil.c index c0dc5f66d..0a5d779e1 100644 --- a/keyserver/ksutil.c +++ b/keyserver/ksutil.c @@ -92,6 +92,7 @@ free_ks_options(struct ks_options *opt) free(opt->scheme); free(opt->auth); free(opt->path); + free(opt->opaque); free(opt->ca_cert_file); free(opt); } @@ -205,10 +206,12 @@ parse_ks_options(char *line,struct ks_options *opt) start=&option[3]; } - if(strcasecmp(start,"verbose")==0) + if(strncasecmp(start,"verbose",7)==0) { if(no) - opt->verbose--; + opt->verbose=0; + else if(start[7]=='=') + opt->verbose=atoi(&start[8]); else opt->verbose++; }