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) {
|
if (match[12].rm_so != -1) {
|
||||||
domain = get_string_arg (line, &match[12]);
|
domain = get_string_arg (line, &match[12]);
|
||||||
if (domain) {
|
if (domain) {
|
||||||
upstream_bauth_add (ip, port, basic_auth, domain,
|
upstream_add (ip, port, basic_auth, domain,
|
||||||
&conf->upstream_list);
|
&conf->upstream_list);
|
||||||
safefree (domain);
|
safefree (domain);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
upstream_bauth_add (ip, port, basic_auth, NULL,
|
upstream_add (ip, port, basic_auth, NULL, &conf->upstream_list);
|
||||||
&conf->upstream_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
safefree (basic_auth);
|
safefree (basic_auth);
|
||||||
@ -1113,7 +1112,7 @@ static HANDLE_FUNC (handle_upstream_no)
|
|||||||
if (!domain)
|
if (!domain)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
upstream_add (NULL, 0, domain, &conf->upstream_list);
|
upstream_add (NULL, 0, NULL, domain, &conf->upstream_list);
|
||||||
safefree (domain);
|
safefree (domain);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -30,8 +30,7 @@
|
|||||||
|
|
||||||
#ifdef UPSTREAM_SUPPORT
|
#ifdef UPSTREAM_SUPPORT
|
||||||
/**
|
/**
|
||||||
* Construct an upstream struct from input data, with basic auth credentials.
|
* Construct an upstream struct from input data.
|
||||||
* 'basic_auth' can be NULL.
|
|
||||||
*/
|
*/
|
||||||
static struct upstream *upstream_build (const char *host, int port,
|
static struct upstream *upstream_build (const char *host, int port,
|
||||||
const char *basic_auth,
|
const char *basic_auth,
|
||||||
@ -126,11 +125,10 @@ fail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add an entry to the upstream list, with basic auth credentials.
|
* Add an entry to the upstream list.
|
||||||
* 'basic_auth' can be NULL.
|
|
||||||
*/
|
*/
|
||||||
void upstream_bauth_add (const char *host, int port, const char *basic_auth,
|
void upstream_add (const char *host, int port, const char *basic_auth,
|
||||||
const char *domain, struct upstream **upstream_list)
|
const char *domain, struct upstream **upstream_list)
|
||||||
{
|
{
|
||||||
struct upstream *up;
|
struct upstream *up;
|
||||||
|
|
||||||
@ -173,15 +171,6 @@ upstream_cleanup:
|
|||||||
return;
|
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
|
* Check if a host is in the upstream list
|
||||||
*/
|
*/
|
||||||
|
@ -41,11 +41,9 @@ struct upstream {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef UPSTREAM_SUPPORT
|
#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);
|
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 struct upstream *upstream_get (char *host, struct upstream *up);
|
||||||
extern void free_upstream_list (struct upstream *up);
|
extern void free_upstream_list (struct upstream *up);
|
||||||
#endif /* UPSTREAM_SUPPORT */
|
#endif /* UPSTREAM_SUPPORT */
|
||||||
|
Loading…
Reference in New Issue
Block a user