projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Added basic print output.
[m6w6/libmemcached]
/
lib
/
memcached.c
diff --git
a/lib/memcached.c
b/lib/memcached.c
index c636b9b4e994e938cbcca1d1cd32d4abbdda7b16..6cf81c734664d65da4dfa7dd0cd4911658cd39f3 100644
(file)
--- a/
lib/memcached.c
+++ b/
lib/memcached.c
@@
-1,7
+1,7
@@
/*
Memcached library
*/
/*
Memcached library
*/
-#include
<memcached.h>
+#include
"common.h"
memcached_st *memcached_init(memcached_st *ptr)
{
memcached_st *memcached_init(memcached_st *ptr)
{
@@
-26,14
+26,14
@@
memcached_st *memcached_init(memcached_st *ptr)
void memcached_deinit(memcached_st *ptr)
{
unsigned int x;
void memcached_deinit(memcached_st *ptr)
{
unsigned int x;
- memcached_host_st *host_ptr;
if (ptr->hosts)
{
for (x= 0; x < ptr->number_of_hosts; x++)
{
if (ptr->hosts)
{
for (x= 0; x < ptr->number_of_hosts; x++)
{
- if (ptr->hosts[x].fd
== -1
)
+ if (ptr->hosts[x].fd
> 0
)
close(ptr->hosts[x].fd);
close(ptr->hosts[x].fd);
+
free(ptr->hosts[x].hostname);
}
free(ptr->hosts[x].hostname);
}