int srv_set_addr_via_libc(struct server *srv, int *err_code)
{
if (str2ip2(srv->hostname, &srv->addr, 1) == NULL) {
- Alert("parsing [%s:%d] : 'server %s' : invalid address: '%s'\n",
- srv->conf.file, srv->conf.line, srv->id, srv->hostname);
if (err_code)
- *err_code |= ERR_ALERT | ERR_FATAL;
+ *err_code |= ERR_WARN;
return 1;
}
return 0;
case SRV_IADDR_NONE:
srv_set_admin_flag(srv, SRV_ADMF_RMAINT, NULL);
+ if (return_code) {
+ Warning("parsing [%s:%d] : 'server %s' : could not resolve address '%s', disabling server.\n",
+ srv->conf.file, srv->conf.line, srv->id, srv->hostname);
+ }
return return_code;
default: /* unhandled method */
Alert("parsing [%s:%d] : 'server %s' : no method found to resolve address '%s'\n",
srv->conf.file, srv->conf.line, srv->id, srv->hostname);
}
+ else {
+ Alert("parsing [%s:%d] : 'server %s' : could not resolve address '%s'.\n",
+ srv->conf.file, srv->conf.line, srv->id, srv->hostname);
+ }
return_code |= ERR_ALERT | ERR_FATAL;
return return_code;