projects
/
psqlodbc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82a80bb
)
Call getaddrinfo() with AI_NUMERICSERV because the service is a port number.
author
Hiroshi Inoue
<inoue@tpf.co.jp>
Wed, 11 Dec 2013 11:50:02 +0000
(20:50 +0900)
committer
Hiroshi Inoue
<inoue@tpf.co.jp>
Wed, 11 Dec 2013 11:53:50 +0000
(20:53 +0900)
socket.c
patch
|
blob
|
blame
|
history
diff --git
a/socket.c
b/socket.c
index 01ea56cf5d40cfe37cb8f1cc5c106ca1f1e2c9e1..61d36ecbdf8ff74f4af78262e9d1c3f95f8a1cf8 100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-279,6
+279,7
@@
SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname, long tim
rest.ai_socktype = SOCK_STREAM;
rest.ai_family = AF_UNSPEC;
snprintf(portstr, sizeof(portstr), "%d", port);
+ rest.ai_flags |= AI_NUMERICSERV;
if (is_numeric_address(hostname))
/* don't resolve address in getaddrinfo() if not necessary */
rest.ai_flags |= AI_NUMERICHOST;