Renamed upstream_bauth_add -> upstream_add
This commit is contained in:
parent
14eae55fef
commit
066b2d5ede
@ -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;
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user