projects
/
awesomized
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
70d4781
)
Skip IPv6 addresses in UDP mode (the server doesn't listen on them)
author
Eric Lambert
<eric.lambert@sun.com>
Mon, 9 Mar 2009 22:01:08 +0000
(23:01 +0100)
committer
Eric Lambert
<eric.lambert@sun.com>
Mon, 9 Mar 2009 22:01:08 +0000
(23:01 +0100)
libmemcached/memcached_connect.c
patch
|
blob
|
history
diff --git
a/libmemcached/memcached_connect.c
b/libmemcached/memcached_connect.c
index c2e03ac38e7a4279512f84c0c096e63545769f1c..f066c52661d25a585585d60fa5496aad08cc2cf9 100644
(file)
--- a/
libmemcached/memcached_connect.c
+++ b/
libmemcached/memcached_connect.c
@@
-208,6
+208,12
@@
static memcached_return network_connect(memcached_server_st *ptr)
/* Create the socket */
while (use != NULL)
{
+ /* Memcache server does not support IPV6 in udp mode, so skip if not ipv4 */
+ if (ptr->type == MEMCACHED_CONNECTION_UDP && use->ai_family != AF_INET) {
+ use= use->ai_next;
+ continue;
+ }
+
if ((ptr->fd= socket(use->ai_family,
use->ai_socktype,
use->ai_protocol)) < 0)