diff --git a/src/conf.c b/src/conf.c index 4f9e55f..e555424 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1090,13 +1090,12 @@ static HANDLE_FUNC (handle_upstream) if (match[12].rm_so != -1) { domain = get_string_arg (line, &match[12]); if (domain) { - upstream_bauth_add (ip, port, basic_auth, domain, - &conf->upstream_list); + upstream_add (ip, port, basic_auth, domain, + &conf->upstream_list); safefree (domain); } } else { - upstream_bauth_add (ip, port, basic_auth, NULL, - &conf->upstream_list); + upstream_add (ip, port, basic_auth, NULL, &conf->upstream_list); } safefree (basic_auth); @@ -1113,7 +1112,7 @@ static HANDLE_FUNC (handle_upstream_no) if (!domain) return -1; - upstream_add (NULL, 0, domain, &conf->upstream_list); + upstream_add (NULL, 0, NULL, domain, &conf->upstream_list); safefree (domain); return 0; diff --git a/src/upstream.c b/src/upstream.c index eda28f2..201e967 100644 --- a/src/upstream.c +++ b/src/upstream.c @@ -30,8 +30,7 @@ #ifdef UPSTREAM_SUPPORT /** - * Construct an upstream struct from input data, with basic auth credentials. - * 'basic_auth' can be NULL. + * Construct an upstream struct from input data. */ static struct upstream *upstream_build (const char *host, int port, const char *basic_auth, @@ -126,11 +125,10 @@ fail: } /* - * Add an entry to the upstream list, with basic auth credentials. - * 'basic_auth' can be NULL. + * Add an entry to the upstream list. */ -void upstream_bauth_add (const char *host, int port, const char *basic_auth, - const char *domain, struct upstream **upstream_list) +void upstream_add (const char *host, int port, const char *basic_auth, + const char *domain, struct upstream **upstream_list) { struct upstream *up; @@ -173,15 +171,6 @@ upstream_cleanup: return; } -/* - * Add an entry to the upstream list - */ -void upstream_add (const char *host, int port, const char *domain, - struct upstream **upstream_list) -{ - upstream_bauth_add (host, port, NULL, domain, upstream_list); -} - /* * Check if a host is in the upstream list */ diff --git a/src/upstream.h b/src/upstream.h index 1e965e1..1431d4b 100644 --- a/src/upstream.h +++ b/src/upstream.h @@ -41,11 +41,9 @@ struct upstream { }; #ifdef UPSTREAM_SUPPORT -extern void upstream_add (const char *host, int port, const char *domain, +extern void upstream_add (const char *host, int port, + const char *basic_auth, const char *domain, struct upstream **upstream_list); -extern void upstream_bauth_add (const char *host, int port, - const char *basic_auth, const char *domain, - struct upstream **upstream_list); extern struct upstream *upstream_get (char *host, struct upstream *up); extern void free_upstream_list (struct upstream *up); #endif /* UPSTREAM_SUPPORT */