summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64312ec)
raw | patch | inline | side by side (parent: 64312ec)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Jan 2015 21:02:31 +0000 (22:02 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Jan 2015 21:02:31 +0000 (22:02 +0100) |
src/utils/os.c | patch | blob | history |
diff --git a/src/utils/os.c b/src/utils/os.c
index d8f707418b9cadb57040ef20473e6ee7d9b1de7d..4afc466683138aed81667a446638698bbe96da91 100644 (file)
--- a/src/utils/os.c
+++ b/src/utils/os.c
ai_hints.ai_family = AF_INET6;
else
ai_hints.ai_family = AF_UNSPEC;
+
if ((network & SDB_NET_IP) == SDB_NET_IP) {
ai_hints.ai_socktype = 0;
ai_hints.ai_protocol = 0;
}
else if (network & SDB_NET_UDP) {
ai_hints.ai_socktype = SOCK_DGRAM;
- ai_hints.ai_socktype = IPPROTO_UDP;
+ ai_hints.ai_protocol = IPPROTO_UDP;
}
status = getaddrinfo(host, port, &ai_hints, res);