Skip to content

Commit c15ed8b

Browse files
committed
raw
1 parent eeaf525 commit c15ed8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/pg_exchange/nodeDistPlanExec.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,14 @@ get_hostname(const char *sipaddr)
706706
char *hostname;
707707
struct addrinfo hintp;
708708
struct addrinfo *result;
709-
710709
struct sockaddr_storage saddr;
711710
int res;
712711

712+
MemSet(&hintp, 0, sizeof(hintp));
713+
hintp.ai_socktype = SOCK_STREAM;
714+
hintp.ai_family = AF_UNSPEC;
715+
hintp.ai_flags = AI_ALL;
716+
713717
if ((res = pg_getaddrinfo_all(sipaddr, NULL, &hintp, &result)) != 0)
714718
elog(FATAL, "Cannot resolve network address %s, error=%d.", sipaddr, res);
715719
memcpy(&saddr, result->ai_addr, result->ai_addrlen);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy