[Users] Domain: is_from_local() is case sensitive in caching mode.

Juha Heinanen jh at tutpro.com
Mon Mar 13 11:47:49 CET 2006


Klaus Darilion writes:

 > This could be fixed with following patch:
 > 
 > --- sip_router/modules/domain/hash.c    2004-08-24 10:58:27.000000000 +0200
 > +++ sip_router-patched/modules/domain/hash.c    2005-11-17 
 > 13:34:36.314480955 +0100
 > @@ -35,6 +35,7 @@
 >   #include <stdlib.h>
 >   #include <string.h>
 >   #include <stdio.h>
 > +#include <ctype.h>
 > 
 > 
 >   /* String hash function */
 > @@ -49,7 +50,7 @@
 >     len = domain->len;
 > 
 >     for (i = 0; i < len; i++) {
 > -         h = ( h << 5 ) - h + *(p + i);
 > +         h = ( h << 5 ) - h + tolower(*(p + i));
 >     }
 > 
 >     return h % HASH_SIZE;

yes, juha




More information about the Users mailing list