diff options
author | Ben Laurie <ben@apache.org> | 2000-06-17 16:29:53 +0000 |
---|---|---|
committer | Ben Laurie <ben@apache.org> | 2000-06-17 16:29:53 +0000 |
commit | c0a4cb787356028a11170db449f9a7d2f8237885 (patch) | |
tree | fc196bbfba8c2d7329746663b7d2f4635b4bad74 /server/vhost.c | |
parent | 7a22b1a75a52eaf8cc9519c490c299c0d0159562 (diff) | |
download | httpd-c0a4cb787356028a11170db449f9a7d2f8237885.tar.gz |
More consification, correct command initialisation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85599 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r-- | server/vhost.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/server/vhost.c b/server/vhost.c index 920146366a..ab4be461bd 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -179,7 +179,7 @@ void ap_init_vhost_config(ap_pool_t *p) * *paddr is the variable used to keep track of **paddr between calls * port is the default port to assume */ -static const char *get_addresses(ap_pool_t *p, const char *w, +static const char *get_addresses(ap_pool_t *p, const char *w_, server_addr_rec ***paddr, unsigned port) { struct hostent *hep; @@ -187,10 +187,12 @@ static const char *get_addresses(ap_pool_t *p, const char *w, server_addr_rec *sar; char *t; int i, is_an_ip_addr; + char *w; - if (*w == 0) + if (*w_ == 0) return NULL; + w=ap_pstrdup(p, w_); t = strchr(w, ':'); if (t) { if (strcmp(t + 1, "*") == 0) { @@ -225,8 +227,6 @@ static const char *get_addresses(ap_pool_t *p, const char *w, sar->host_addr.s_addr = my_addr; sar->host_port = port; sar->virthost = ap_pstrdup(p, w); - if (t != NULL) - *t = ':'; return NULL; } @@ -235,8 +235,6 @@ static const char *get_addresses(ap_pool_t *p, const char *w, if ((!hep) || (hep->h_addrtype != AF_INET || !hep->h_addr_list[0])) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL, "Cannot resolve host name %s --- ignoring!", w); - if (t != NULL) - *t = ':'; return NULL; } @@ -249,8 +247,6 @@ static const char *get_addresses(ap_pool_t *p, const char *w, sar->virthost = ap_pstrdup(p, w); } - if (t != NULL) - *t = ':'; return NULL; } |