From: Date: Mon, 3 Nov 2008 21:51:23 +0000 (+0530) Subject: Merge fixed from trond X-Git-Tag: 0.25~11 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=929a8caf41ed6e616b24d02fad4281a316e55751;p=awesomized%2Flibmemcached Merge fixed from trond --- diff --git a/config/bootstrap b/config/bootstrap index 74d9fa1d..624c1457 100755 --- a/config/bootstrap +++ b/config/bootstrap @@ -26,9 +26,9 @@ set -e ## We do not currently support glibtoolize if test x$LIBTOOLIZE = x; then -# if test \! "x`which glibtoolize 2> /dev/null | grep -v '^no'`" = x; then -# LIBTOOLIZE=glibtoolize - if test \! "x`which libtoolize-1.5 2> /dev/null | grep -v '^no'`" = x; then + if test \! "x`which glibtoolize 2> /dev/null | grep -v '^no'`" = x; then + LIBTOOLIZE=glibtoolize + elif test \! "x`which libtoolize-1.5 2> /dev/null | grep -v '^no'`" = x; then LIBTOOLIZE=libtoolize-1.5 elif test \! "x`which libtoolize 2> /dev/null | grep -v '^no'`" = x; then LIBTOOLIZE=libtoolize diff --git a/libmemcached/memcached.c b/libmemcached/memcached.c index accf24b7..767075d4 100644 --- a/libmemcached/memcached.c +++ b/libmemcached/memcached.c @@ -28,8 +28,9 @@ memcached_st *memcached_create(memcached_st *ptr) ptr->retry_timeout= 0; ptr->distribution= MEMCACHED_DISTRIBUTION_MODULA; - ptr->io_msg_watermark = 500; - ptr->io_bytes_watermark = 65 * 1024; + /* TODO, Document why we picked these defaults */ + ptr->io_msg_watermark= 500; + ptr->io_bytes_watermark= 65 * 1024; return ptr; } diff --git a/libmemcached/memcached_purge.c b/libmemcached/memcached_purge.c index d9d43057..749a30d6 100644 --- a/libmemcached/memcached_purge.c +++ b/libmemcached/memcached_purge.c @@ -5,21 +5,23 @@ void memcached_purge(memcached_server_st *ptr) { + int32_t timeout; char buffer[2048]; - size_t buffer_length = sizeof(buffer); + size_t buffer_length= sizeof(buffer); memcached_result_st result; if (ptr->root->purging || /* already purging */ (memcached_server_response_count(ptr) < ptr->root->io_msg_watermark && ptr->io_bytes_sent < ptr->root->io_bytes_watermark) || (ptr->io_bytes_sent > ptr->root->io_bytes_watermark && - memcached_server_response_count(ptr) < 10)) { + memcached_server_response_count(ptr) < 10)) + { return; } /* memcached_io_write and memcached_response may call memcached_purge so we need to be able stop any recursion.. */ - ptr->root->purging = 1; + ptr->root->purging= 1; /* Force a flush of the buffer to ensure that we don't have the n-1 pending requests buffered up.. */ @@ -33,10 +35,10 @@ void memcached_purge(memcached_server_st *ptr) /* memcached_response may call memcached_io_read, but let's use a short timeout if there is no data yet */ - int32_t timeout = ptr->root->poll_timeout; - ptr->root->poll_timeout = 1; + timeout= ptr->root->poll_timeout; + ptr->root->poll_timeout= 1; memcached_response(ptr, buffer, sizeof(buffer), &result); - ptr->root->poll_timeout = timeout; + ptr->root->poll_timeout= timeout; memcached_server_response_increment(ptr); ptr->root->purging = 0; }