gnupg/keyserver (ChangeLog gpgkeys_curl.c gpgkeys_http.c ksutil.h)
cvs user wk
cvs at cvs.gnupg.org
Tue Jan 18 12:08:25 CET 2005
Date: Tuesday, January 18, 2005 @ 12:16:10
Author: wk
Path: /cvs/gnupg/gnupg/keyserver
Modified: ChangeLog gpgkeys_curl.c gpgkeys_http.c ksutil.h
* gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
the W32 defined macro. Removed unneeded initialization of static
variables.
* gpgkeys_http.c: Ditto.
* ksutil.h: s/MAX_PATH/URLMAX_PATH/.
----------------+
ChangeLog | 8 ++++++++
gpgkeys_curl.c | 15 ++++++++++-----
gpgkeys_http.c | 12 ++++++++----
ksutil.h | 5 +++--
4 files changed, 29 insertions(+), 11 deletions(-)
Index: gnupg/keyserver/ChangeLog
diff -u gnupg/keyserver/ChangeLog:1.104 gnupg/keyserver/ChangeLog:1.105
--- gnupg/keyserver/ChangeLog:1.104 Tue Jan 18 05:24:52 2005
+++ gnupg/keyserver/ChangeLog Tue Jan 18 12:16:10 2005
@@ -1,3 +1,11 @@
+2005-01-18 Werner Koch <wk at g10code.com>
+
+ * gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
+ the W32 defined macro. Removed unneeded initialization of static
+ variables.
+ * gpgkeys_http.c: Ditto.
+ * ksutil.h: s/MAX_PATH/URLMAX_PATH/.
+
2005-01-17 David Shaw <dshaw at grover.jabberwocky.com>
* gpgkeys_curl.c (main): Only allow specified protocols to use the
Index: gnupg/keyserver/gpgkeys_curl.c
diff -u gnupg/keyserver/gpgkeys_curl.c:1.7 gnupg/keyserver/gpgkeys_curl.c:1.8
--- gnupg/keyserver/gpgkeys_curl.c:1.7 Tue Jan 18 05:24:52 2005
+++ gnupg/keyserver/gpgkeys_curl.c Tue Jan 18 12:16:10 2005
@@ -35,10 +35,15 @@
extern int optind;
static int verbose=0;
-static char scheme[MAX_SCHEME+1],auth[MAX_AUTH+1],host[MAX_HOST+1]={'\0'},port[MAX_PORT+1]={'\0'},path[MAX_PATH+1]={'\0'},proxy[MAX_PROXY+1]={'\0'};
-static FILE *input=NULL,*output=NULL,*console=NULL;
+static char scheme[MAX_SCHEME+1];
+static char auth[MAX_AUTH+1];
+static char host[MAX_HOST+1];
+static char port[MAX_PORT+1];
+static char path[URLMAX_PATH+1];
+static char proxy[MAX_PROXY+1;
+static FILE *input, *output, *console;
static CURL *curl;
-static char request[MAX_URL]={'\0'};
+static char request[MAX_URL];
static int
curl_err_to_gpg_err(CURLcode error)
@@ -217,9 +222,9 @@
continue;
}
- if(sscanf(line,"PATH %" MKSTRING(MAX_PATH) "s\n",path)==1)
+ if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1)
{
- path[MAX_PATH]='\0';
+ path[URLMAX_PATH]='\0';
continue;
}
Index: gnupg/keyserver/gpgkeys_http.c
diff -u gnupg/keyserver/gpgkeys_http.c:1.11 gnupg/keyserver/gpgkeys_http.c:1.12
--- gnupg/keyserver/gpgkeys_http.c:1.11 Fri Jan 14 00:37:26 2005
+++ gnupg/keyserver/gpgkeys_http.c Tue Jan 18 12:16:10 2005
@@ -38,8 +38,12 @@
static int verbose=0;
static unsigned int http_flags=0;
-static char auth[MAX_AUTH+1]={'\0'},host[MAX_HOST+1]={'\0'},proxy[MAX_PROXY+1]={'\0'},port[MAX_PORT+1]={'\0'},path[MAX_PATH+1]={'\0'};
-static FILE *input=NULL,*output=NULL,*console=NULL;
+static char auth[MAX_AUTH+1];
+static char host[MAX_HOST+1];
+static char proxy[MAX_PROXY+1];
+static char port[MAX_PORT+1];
+static char path[URLMAX_PATH+1];
+static FILE *input,*output,*console;
#ifdef __riscos__
#define HTTP_PROXY_ENV "GnuPG$HttpProxy"
@@ -231,9 +235,9 @@
continue;
}
- if(sscanf(line,"PATH %" MKSTRING(MAX_PATH) "s\n",path)==1)
+ if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1)
{
- path[MAX_PATH]='\0';
+ path[URLMAX_PATH]='\0';
continue;
}
Index: gnupg/keyserver/ksutil.h
diff -u gnupg/keyserver/ksutil.h:1.2 gnupg/keyserver/ksutil.h:1.3
--- gnupg/keyserver/ksutil.h:1.2 Fri Jan 14 00:37:26 2005
+++ gnupg/keyserver/ksutil.h Tue Jan 18 12:16:10 2005
@@ -36,9 +36,10 @@
#define MAX_AUTH 128
#define MAX_HOST 80
#define MAX_PORT 10
-#define MAX_PATH 1024
+#define URLMAX_PATH 1024
#define MAX_PROXY 128
-#define MAX_URL (MAX_SCHEME+1+3+MAX_AUTH+1+1+MAX_HOST+1+1+MAX_PORT+1+1+MAX_PATH+1+50)
+#define MAX_URL (MAX_SCHEME+1+3+MAX_AUTH+1+1+MAX_HOST+1+1 \
+ +MAX_PORT+1+1+URLMAX_PATH+1+50)
#define STRINGIFY(x) #x
#define MKSTRING(x) STRINGIFY(x)
More information about the Gnupg-commits
mailing list