Done.

Ken


[EMAIL PROTECTED] wrote:
> 
> I discovered a bug in lib/util.c of the CVS version of cyrus-imapd-2.0.16.
> It only causes trouble if you configure Cyrus with the improved directory
> hashing and enable hashed spool directories.  The result of the bug is that
> subfolders hash into different hash directories than the INBOX.  The fix
> is below.  Could somebody apply it to CVS?
> 
> ================================================================
> *** util.Oc     Sun Aug 12 13:22:13 2001
> --- util.c      Thu Sep 20 21:32:47 2001
> ***************
> *** 232,239 ****
> 
>   /* Examine the name of a file, and return a single character
>    *  (as an int) that can be used as the name of a hash
> !  *  directory.  Caller is responsible for skipping any prefix
> !  *  of the name.
>    */
>   int dir_hash_c(char *name)
>   {
> --- 232,239 ----
> 
>   /* Examine the name of a file, and return a single character
>    *  (as an int) that can be used as the name of a hash
> !  *  directory.  Stop before the first dot.  Caller is responsible
> !  *  for skipping any prefix of the name.
>    */
>   int dir_hash_c(char *name)
>   {
> ***************
> *** 244,250 ****
> 
>       n = 0;
>       pt = (unsigned char *)name;
> !     while (*pt) {
>         n = ((n << DIR_X) ^ (n >> DIR_Y)) ^ *pt;
>         ++pt;
>       }
> --- 244,250 ----
> 
>       n = 0;
>       pt = (unsigned char *)name;
> !     while (*pt && *pt != '.') {
>         n = ((n << DIR_X) ^ (n >> DIR_Y)) ^ *pt;
>         ++pt;
>       }
> ================================================================
> 
> --
> -Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

Reply via email to