X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finternet_addressing.c;h=ae8a6ceed7c0c31f1d170bff6492c4eadad2208c;hb=b425dda0a48b4a3e24a9f22d25e864d42679feee;hp=c4bfc9b51210b9ceeccec77037f3f304bc680883;hpb=8b8941a7c48dfcbec1f356150990da20093d6a16;p=citadel.git diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index c4bfc9b51..ae8a6ceed 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -115,16 +115,17 @@ int CtdlHostAlias(char *fqdn) { */ int fuzzy_match(struct ctdluser *us, char *matchstring) { int a; + long len; if ( (!strncasecmp(matchstring, "cit", 3)) && (atol(&matchstring[3]) == us->usernum)) { return 0; } - - for (a=0; afullname); ++a) { + len = strlen(matchstring); + for (a=0; !IsEmptyStr(&us->fullname[a]); ++a) { if (!strncasecmp(&us->fullname[a], - matchstring, strlen(matchstring))) { + matchstring, len)) { return 0; } } @@ -552,7 +553,7 @@ void directory_key(char *key, char *addr) { int i; int keylen = 0; - for (i=0; i