projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Update libtest/fedora/lion fixes
[awesomized/libmemcached]
/
libmemcached
/
server.cc
diff --git
a/libmemcached/server.cc
b/libmemcached/server.cc
index 955e1b30a248e414752663320cc00368a5cb7e16..bde53c7e4c68954f3bd6081d81a8ebdeb1ece3f9 100644
(file)
--- a/
libmemcached/server.cc
+++ b/
libmemcached/server.cc
@@
-39,7
+39,6
@@
This is a partial implementation for fetching/creating memcached_server_st objects.
*/
#include <libmemcached/common.h>
This is a partial implementation for fetching/creating memcached_server_st objects.
*/
#include <libmemcached/common.h>
-#include <cassert>
static inline void _server_init(memcached_server_st *self, memcached_st *root,
const char *hostname, in_port_t port,
static inline void _server_init(memcached_server_st *self, memcached_st *root,
const char *hostname, in_port_t port,
@@
-120,7
+119,9
@@
memcached_server_st *__server_create_with(const memcached_st *memc,
self= _server_create(self, memc);
if (not self)
self= _server_create(self, memc);
if (not self)
+ {
return NULL;
return NULL;
+ }
_server_init(self, const_cast<memcached_st *>(memc), hostname, port, weight, type);
_server_init(self, const_cast<memcached_st *>(memc), hostname, port, weight, type);
@@
-141,6
+142,7
@@
void __server_free(memcached_server_st *self)
if (self->address_info)
{
freeaddrinfo(self->address_info);
if (self->address_info)
{
freeaddrinfo(self->address_info);
+ self->address_info= NULL;
}
memcached_error_free(*self);
}
memcached_error_free(*self);
@@
-237,7
+239,9
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
unsigned int iferror= (*callback)(ptr, instance, context);
if (iferror)
unsigned int iferror= (*callback)(ptr, instance, context);
if (iferror)
+ {
continue;
continue;
+ }
}
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;
@@
-281,7
+285,9
@@
void memcached_server_error_reset(memcached_server_st *self)
{
WATCHPOINT_ASSERT(self);
if (not self)
{
WATCHPOINT_ASSERT(self);
if (not self)
+ {
return;
return;
+ }
memcached_error_free(*self);
}
memcached_error_free(*self);
}