mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 06:06:59 -04:00
[MINOR] Manage socket type unix for some logs
This commit is contained in:
parent
ec810d1dc7
commit
0aaccf88f9
1 changed files with 18 additions and 6 deletions
24
src/proxy.c
24
src/proxy.c
|
|
@ -687,15 +687,27 @@ void listen_proxies(void)
|
|||
} else {
|
||||
int port;
|
||||
|
||||
if (l->addr.ss_family == AF_INET6)
|
||||
if (l->addr.ss_family == AF_INET6) {
|
||||
port = ntohs(((struct sockaddr_in6 *)(&l->addr))->sin6_port);
|
||||
else
|
||||
Warning("Port %d busy while trying to enable %s %s.\n",
|
||||
port, proxy_cap_str(p->cap), p->id);
|
||||
send_log(p, LOG_WARNING, "Port %d busy while trying to enable %s %s.\n",
|
||||
port, proxy_cap_str(p->cap), p->id);
|
||||
}
|
||||
else if (l->addr.ss_family == AF_INET) {
|
||||
port = ntohs(((struct sockaddr_in *)(&l->addr))->sin_port);
|
||||
Warning("Port %d busy while trying to enable %s %s.\n",
|
||||
port, proxy_cap_str(p->cap), p->id);
|
||||
send_log(p, LOG_WARNING, "Port %d busy while trying to enable %s %s.\n",
|
||||
port, proxy_cap_str(p->cap), p->id);
|
||||
}
|
||||
else {
|
||||
Warning("Bind on socket %d busy while trying to enable %s %s.\n",
|
||||
l->luid, proxy_cap_str(p->cap), p->id);
|
||||
send_log(p, LOG_WARNING, "Bind on socket %d busy while trying to enable %s %s.\n",
|
||||
l->luid, proxy_cap_str(p->cap), p->id);
|
||||
}
|
||||
|
||||
Warning("Port %d busy while trying to enable %s %s.\n",
|
||||
port, proxy_cap_str(p->cap), p->id);
|
||||
send_log(p, LOG_WARNING, "Port %d busy while trying to enable %s %s.\n",
|
||||
port, proxy_cap_str(p->cap), p->id);
|
||||
/* Another port might have been enabled. Let's stop everything. */
|
||||
pause_proxy(p);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue