pgpool2.git / summary / log / commit / refs

commit    5706319b68eebfea1894753ed028f95683f7a37f
Author:   pengbo <pengbo@sraoss.co.jp>
Date:     Tue Jan 10 07:59:37 2017 +0000

    Fix bug failed to create INET domain socket in FreeBSD if listen_addresses = '*'.
    
    per bug202.


src/main/pgpool_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index f633bba5e..5b769908d 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -805,7 +805,7 @@ static int *create_inet_domain_sockets(const char *hostname, const int port) errdetail("asprintf() failed: %s", strerror(errno)))); } - if ((ret = getaddrinfo(hostname, portstr, &hints, &res)) != 0) + if ((ret = getaddrinfo((!hostname || strcmp(hostname, "*") == 0) ? NULL : hostname, portstr, &hints, &res)) != 0) { ereport(FATAL, (errmsg("failed to create INET domain socket"), [parent: e6d960686cd1]