X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached.c;h=7324de41deb16ee2b97e447a6347e6408322a152;hb=2a34f4dcac48917e41a1b6aee37edbe886aa9f7b;hp=bc335dd8bf6139d96b27f853643bf57e0dce88de;hpb=3dee67d04099cc5e2986ed94aa612f429f54d6fb;p=awesomized%2Flibmemcached diff --git a/libmemcached/memcached.c b/libmemcached/memcached.c index bc335dd8..7324de41 100644 --- 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, - .cork= false, .hash_with_prefix_key= false, - .ketama_weighted= 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, - .ping_service= false } }; @@ -51,7 +48,11 @@ static inline bool _memcached_init(memcached_st *self) 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; @@ -68,22 +69,18 @@ static inline bool _memcached_init(memcached_st *self) 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->continuum_count= 0; 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->continuum= NULL; 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->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;