-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) core: Fix segfault in logging if r->useragent_addr or c->client_addr is
+ unset. [Stefan Fritsch]
+
*) cross-compile: allow to provide CC_FOR_BUILD so that gen_test_char will
be compiled by the build compiler instead of the host compiler.
Also set CC_FOR_BUILD to 'cc' when cross-compilation is detected.
{
if (info->r && !(arg && *arg == 'c'))
return apr_snprintf(buf, buflen, "%s:%d", info->r->useragent_ip,
- info->r->useragent_addr->port);
+ info->r->useragent_addr ? info->r->useragent_addr->port : 0);
else if (info->c)
return apr_snprintf(buf, buflen, "%s:%d", info->c->client_ip,
- info->c->client_addr->port);
+ info->c->client_addr ? info->c->client_addr->port : 0);
else
return 0;
}
if (info->r) {
len += apr_snprintf(buf + len, buflen - len,
info->r->connection->sbh ? "[client %s:%d] " : "[remote %s:%d] ",
- info->r->useragent_ip, info->r->useragent_addr->port);
+ info->r->useragent_ip,
+ info->r->useragent_addr ? info->r->useragent_addr->port : 0);
}
else if (info->c) {
len += apr_snprintf(buf + len, buflen - len,
info->c->sbh ? "[client %s:%d] " : "[remote %s:%d] ",
- info->c->client_ip, info->c->client_addr->port);
+ info->c->client_ip,
+ info->c->client_addr ? info->c->client_addr->port : 0);
}
/* the actual error message */