summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-02-25 10:41:20 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-02-25 10:41:20 +0000
commit96c7df3d5b652367dff87031730629c2109d607a (patch)
tree7f8409651b77f269b92b8a85ed722682bda7c153 /radsecproxy.c
parent6e39f3302751a845c390695cf15c5639da9bbd19 (diff)
max logging not crash when resolvepeer fails
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@217 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index a4ffed8..f4c489a 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -187,7 +187,7 @@ int resolvepeer(struct clsrvconf *conf, int ai_flags) {
if (slash)
hints.ai_flags |= AI_NUMERICHOST;
if (getaddrinfo(conf->host, conf->port, &hints, &addrinfo)) {
- debug(DBG_WARN, "resolvepeer: can't resolve %s port %s", conf->host, conf->port);
+ debug(DBG_WARN, "resolvepeer: can't resolve %s port %s", conf->host ? conf->host : "(null)", conf->port ? conf->port : "(null)");
return 0;
}
if (slash) {
@@ -299,7 +299,7 @@ struct clsrvconf *resolve_hostport(char type, char *lconf, char *default_port) {
} else
conf->port = default_port ? stringcopy(default_port, 0) : NULL;
if (!resolvepeer(conf, AI_PASSIVE))
- debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host, conf->port);
+ debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host ? conf->host : "(null)", conf->port ? conf->port : "(null)");
return conf;
}
@@ -2577,7 +2577,7 @@ void confclient_cb(struct gconffile **cf, char *block, char *opt, char *val) {
}
if (!resolvepeer(conf, 0))
- debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host, conf->port);
+ debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host ? conf->host : "(null)", conf->port ? conf->port : "(null)");
if (!conf->secret) {
if (conf->type == 'U')
@@ -2636,7 +2636,7 @@ void confserver_cb(struct gconffile **cf, char *block, char *opt, char *val) {
free(matchcertattr);
if (!resolvepeer(conf, 0))
- debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host, conf->port);
+ debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host ? conf->host : "(null)", conf->port ? conf->port : "(null)");
if (!conf->secret) {
if (conf->type == 'U')