From: Brian Aker Date: Tue, 9 Feb 2010 18:52:56 +0000 (-0800) Subject: Cleanup on uint8 to bool for quit. X-Git-Tag: 0.40~54 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9979e3f8206c764a881550dda41a444f005206f3;p=m6w6%2Flibmemcached Cleanup on uint8 to bool for quit. --- diff --git a/ChangeLog b/ChangeLog index b731085c..a3024f14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ * memcached_purge() now calls any callbacks registered during get execution. * Many fixes to memslap. * Updates for memcapable. +* Compile fixes for OpenBSD. 0.37 Mon Jan 11 16:29:57 PST 2010 * Fixed build for libhashkit. diff --git a/libmemcached/common.h b/libmemcached/common.h index 719a3a94..3391c229 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -102,8 +102,9 @@ extern "C" { LIBMEMCACHED_LOCAL memcached_return_t memcached_connect(memcached_server_instance_st *ptr); + LIBMEMCACHED_LOCAL -void memcached_quit_server(memcached_server_instance_st *ptr, uint8_t io_death); +void memcached_quit_server(memcached_server_instance_st *ptr, bool io_death); LIBMEMCACHED_LOCAL memcached_return_t run_distribution(memcached_st *ptr); @@ -135,7 +136,6 @@ memcached_return_t memcached_key_test(const char * const *keys, const size_t *key_length, size_t number_of_keys); - LIBMEMCACHED_LOCAL uint32_t generate_hash(memcached_st *ptr, const char *key, size_t key_length); diff --git a/libmemcached/quit.c b/libmemcached/quit.c index ebeffa5c..8b5acf67 100644 --- a/libmemcached/quit.c +++ b/libmemcached/quit.c @@ -9,11 +9,11 @@ will force data to be completed. */ -void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death) +void memcached_quit_server(memcached_server_st *ptr, bool io_death) { if (ptr->fd != -1) { - if (io_death == 0 && ptr->type != MEMCACHED_CONNECTION_UDP) + if (io_death == false && ptr->type != MEMCACHED_CONNECTION_UDP) { memcached_return_t rc; char buffer[MEMCACHED_MAX_BUFFER]; @@ -61,7 +61,7 @@ void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death) ptr->read_ptr= ptr->read_buffer; memcached_server_response_reset(ptr); - if(io_death) + if (io_death) { ptr->server_failure_counter++; }