X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fhash.c;h=1c11c50de2c043bd6df6301945a11f5a3977a2ce;hb=2c51ea585ccfbf3a14fed6d28f9115292ad0e6fc;hp=392155c02bc3b22213256e393b4cf7333ece9f18;hpb=dac48f2dbe34915755f8f4f7f88419f47dc9e27f;p=awesomized%2Flibmemcached diff --git a/libmemcached/hash.c b/libmemcached/hash.c index 392155c0..1c11c50d 100644 --- a/libmemcached/hash.c +++ b/libmemcached/hash.c @@ -1,3 +1,14 @@ +/* LibMemcached + * Copyright (C) 2006-2010 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + #include "common.h" @@ -17,7 +28,6 @@ uint32_t generate_hash(memcached_st *ptr, const char *key, size_t key_length) return 0; hash= hashkit_digest(&ptr->hashkit, key, key_length); - WATCHPOINT_ASSERT(hash); return hash; } @@ -92,8 +102,6 @@ uint32_t memcached_generate_hash(memcached_st *ptr, const char *key, size_t key_ hash= generate_hash(ptr, key, key_length); } - WATCHPOINT_ASSERT(hash); - if (memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS) && ptr->next_distribution_rebuild) { struct timeval now; @@ -107,3 +115,8 @@ uint32_t memcached_generate_hash(memcached_st *ptr, const char *key, size_t key_ return dispatch_host(ptr, hash); } + +hashkit_st *memcached_get_hashkit(memcached_st *ptr) +{ + return &ptr->hashkit; +}