projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge in changes around setting up better syntax for distribution.
[awesomized/libmemcached]
/
libmemcached
/
memcached.c
diff --git
a/libmemcached/memcached.c
b/libmemcached/memcached.c
index bc335dd8bf6139d96b27f853643bf57e0dce88de..7324de41deb16ee2b97e447a6347e6408322a152 100644
(file)
--- a/
libmemcached/memcached.c
+++ b/
libmemcached/memcached.c
@@
-21,9
+21,7
@@
static const memcached_st global_copy= {
.auto_eject_hosts= false,
.binary_protocol= false,
.buffer_requests= false,
.auto_eject_hosts= false,
.binary_protocol= false,
.buffer_requests= false,
- .cork= false,
.hash_with_prefix_key= false,
.hash_with_prefix_key= false,
- .ketama_weighted= false,
.no_block= false,
.no_reply= false,
.randomize_replica_read= false,
.no_block= false,
.no_reply= false,
.randomize_replica_read= false,
@@
-35,7
+33,6
@@
static const memcached_st global_copy= {
.use_udp= false,
.verify_key= false,
.tcp_keepalive= false,
.use_udp= false,
.verify_key= false,
.tcp_keepalive= false,
- .ping_service= false
}
};
}
};
@@
-51,7
+48,11
@@
static inline bool _memcached_init(memcached_st *self)
if (! hash_ptr)
return false;
if (! hash_ptr)
return false;
- self->continuum_points_counter= 0;
+ self->ketama.continuum= NULL;
+ self->ketama.continuum_count= 0;
+ self->ketama.continuum_points_counter= 0;
+ self->ketama.next_distribution_rebuild= 0;
+ self->ketama.weighted= false;
self->number_of_hosts= 0;
self->servers= NULL;
self->number_of_hosts= 0;
self->servers= NULL;
@@
-68,22
+69,18
@@
static inline bool _memcached_init(memcached_st *self)
self->tcp_keepidle= 0;
self->io_key_prefetch= 0;
self->tcp_keepidle= 0;
self->io_key_prefetch= 0;
- self->cached_errno= 0;
self->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT;
self->connect_timeout= MEMCACHED_DEFAULT_CONNECT_TIMEOUT;
self->retry_timeout= 0;
self->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT;
self->connect_timeout= MEMCACHED_DEFAULT_CONNECT_TIMEOUT;
self->retry_timeout= 0;
- self->continuum_count= 0;
self->send_size= -1;
self->recv_size= -1;
self->user_data= NULL;
self->send_size= -1;
self->recv_size= -1;
self->user_data= NULL;
- self->next_distribution_rebuild= 0;
self->number_of_replicas= 0;
hash_ptr= hashkit_create(&self->distribution_hashkit);
if (! hash_ptr)
return false;
self->number_of_replicas= 0;
hash_ptr= hashkit_create(&self->distribution_hashkit);
if (! hash_ptr)
return false;
- self->continuum= NULL;
self->allocators= memcached_allocators_return_default();
self->allocators= memcached_allocators_return_default();
@@
-115,8
+112,8
@@
static void _free(memcached_st *ptr, bool release_st)
if (ptr->on_cleanup)
ptr->on_cleanup(ptr);
if (ptr->on_cleanup)
ptr->on_cleanup(ptr);
- if (ptr->continuum)
- libmemcached_free(ptr, ptr->continuum);
+ if (ptr->
ketama.
continuum)
+ libmemcached_free(ptr, ptr->
ketama.
continuum);
memcached_array_free(ptr->prefix_key);
ptr->prefix_key= NULL;
memcached_array_free(ptr->prefix_key);
ptr->prefix_key= NULL;