projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8a5927
)
memcached plugin: actually connect when using a unix socket
author
Jim Radford
<radford@galvanix.com>
Wed, 7 Aug 2013 20:05:47 +0000
(13:05 -0700)
committer
Florian Forster
<octo@collectd.org>
Thu, 8 Aug 2013 07:32:30 +0000
(09:32 +0200)
Signed-off-by: Florian Forster <octo@collectd.org>
src/memcached.c
patch
|
blob
|
history
diff --git
a/src/memcached.c
b/src/memcached.c
index
a09f45e
..
2a5e0f0
100644
(file)
--- a/
src/memcached.c
+++ b/
src/memcached.c
@@
-84,6
+84,15
@@
static int memcached_connect_unix (memcached_t *st)
return (-1);
}
+ /* connect to the memcached daemon */
+ int status = connect (fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
+ if (status != 0)
+ {
+ shutdown (fd, SHUT_RDWR);
+ close (fd);
+ fd = -1;
+ }
+
return (fd);
} /* int memcached_connect_unix */