You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by pq...@apache.org on 2007/06/08 08:13:50 UTC

svn commit: r545432 - /apr/apr-util/trunk/memcache/apr_memcache.c

Author: pquerna
Date: Thu Jun  7 23:13:49 2007
New Revision: 545432

URL: http://svn.apache.org/viewvc?view=rev&rev=545432
Log:
While extremely unlikely, its possible that a key hash could be zero.  Maintain the behavoir of other clients, and set the hash to 1.

Modified:
    apr/apr-util/trunk/memcache/apr_memcache.c

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/memcache/apr_memcache.c?view=diff&rev=545432&r1=545431&r2=545432
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Thu Jun  7 23:13:49 2007
@@ -161,7 +161,7 @@
                                       const apr_uint32_t hash)
 {
     apr_memcache_server_t *ms = NULL;
-    apr_uint32_t h = hash;
+    apr_uint32_t h = hash ? hash : 1;
     apr_uint32_t i = 0;
     apr_time_t curtime = 0;