From 497690d94c624224468d092f808278c7bd4963c2 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Tue, 16 Sep 2008 02:59:20 -0700 Subject: [PATCH] Wrapping up fixed for .24 release --- ChangeLog | 1 + configure.ac | 5 +++-- libmemcached/memcached.h | 2 +- libmemcached/memcached_connect.c | 13 +++++++------ libmemcached/memcached_hosts.c | 6 +++++- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3abd6452..16e53cb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +0.24 Tue Sep 16 02:59:03 PDT 2008 * Cleanup compile warnings. * Fix issues in partitioning by keys. * Fixed "fail case" to make sure when calling memcached_clone() no diff --git a/configure.ac b/configure.ac index 33968234..643273b9 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ MEMCACHED_LIBRARY_NAME=libmemcached #release versioning MEMCACHED_MAJOR_VERSION=0 -MEMCACHED_MINOR_VERSION=23 +MEMCACHED_MINOR_VERSION=24 MEMCACHED_MICRO_VERSION=0 #API version @@ -59,7 +59,8 @@ sinclude(config/protocol_binary.m4) CFLAGS="-DMEMCACHED_INTERNAL $CFLAGS" if test "$GCC" = "yes" then - CFLAGS="-W -std=iso9899:1999 -Wall -Wextra -Wstrict-aliasing -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -O3 $CFLAGS" + #CFLAGS="-W -std=iso9899:1999 -Wall -Wextra -Wstrict-aliasing -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -O3 $CFLAGS" + CFLAGS="-Wall -O3 $CFLAGS" if test "$ENABLE_DEBUG" = "yes" then diff --git a/libmemcached/memcached.h b/libmemcached/memcached.h index 3017fbb1..f0b06948 100644 --- a/libmemcached/memcached.h +++ b/libmemcached/memcached.h @@ -37,7 +37,7 @@ struct memcached_continuum_item_st { uint32_t value; }; -#define LIBMEMCACHED_VERSION_STRING "0.23" +#define LIBMEMCACHED_VERSION_STRING "0.24" struct memcached_stat_st { uint32_t pid; diff --git a/libmemcached/memcached_connect.c b/libmemcached/memcached_connect.c index 54316c59..2b392fb6 100644 --- a/libmemcached/memcached_connect.c +++ b/libmemcached/memcached_connect.c @@ -1,4 +1,5 @@ #include "common.h" +#include #include #include @@ -248,13 +249,13 @@ test_connect: ptr->address_info= NULL; } - if (ptr->root->retry_timeout) - { - struct timeval next_time; + if (ptr->root->retry_timeout) + { + struct timeval next_time; - gettimeofday(&next_time, NULL); - ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout; - } + gettimeofday(&next_time, NULL); + ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout; + } ptr->server_failure_counter+= 1; return MEMCACHED_ERRNO; } diff --git a/libmemcached/memcached_hosts.c b/libmemcached/memcached_hosts.c index 13604d33..3082f693 100644 --- a/libmemcached/memcached_hosts.c +++ b/libmemcached/memcached_hosts.c @@ -152,7 +152,11 @@ memcached_return update_continuum(memcached_st *ptr) float pct = (float)list[host_index].limit_maxbytes/ (float)total_mem_bytes; pointer_per_server= floorf( pct * MEMCACHED_POINTS_PER_SERVER * (float)(ptr->number_of_hosts)); #ifdef HAVE_DEBUG - printf("ketama_weighted:%s|%d|%llu|%u\n", list[host_index].hostname, list[host_index].port, list[host_index].limit_maxbytes, pointer_per_server); + printf("ketama_weighted:%s|%d|%llu|%u\n", + list[host_index].hostname, + list[host_index].port, + (unsigned long long)list[host_index].limit_maxbytes, + pointer_per_server); #endif } for(index= 1; index <= pointer_per_server; ++index) -- 2.30.2