From 1890896fe698c55d15160a53aa6c5c22dc424031 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 2 Mar 2017 18:17:58 +0100 Subject: dirmngr: Rearrange files to fix de6d831. * dirmngr/http-common.c: New. * dirmngr/http-common.h: New. * dirmngr/Makefile.am (dirmngr_SOURCES): Add them. (t_http_SOURCES): Add them. (t_ldap_parse_uri_SOURCES): Add them. * dirmngr/misc.c (get_default_keyserver): Move to ... * dirmngr/http-common.c: here. * dirmngr/http.c: Include http-common.h instead of misc.h. * dirmngr/http-ntbtls.c: Ditto. Signed-off-by: Werner Koch --- dirmngr/misc.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'dirmngr/misc.c') diff --git a/dirmngr/misc.c b/dirmngr/misc.c index d2f1c69a6..6d7c963db 100644 --- a/dirmngr/misc.c +++ b/dirmngr/misc.c @@ -30,29 +30,6 @@ #include "util.h" #include "misc.h" -/* Return a static string with the default keyserver. If NAME_ONLY is - * given only the name part is returned. */ -const char * -get_default_keyserver (int name_only) -{ - static const char *result; - - if (!name_only) - return DIRMNGR_DEFAULT_KEYSERVER; - - if (!result) - { - /* Strip the scheme from the constant. */ - result = strstr (DIRMNGR_DEFAULT_KEYSERVER, "://"); - log_assert (result && strlen (result) > 3); - result += 3; - /* Assert that there is no port given. */ - log_assert (strchr (result, ':')); - } - return result; -} - - /* Convert the hex encoded STRING back into binary and store the result into the provided buffer RESULT. The actual size of that -- cgit v1.2.3