oops, the indexing code did much too much work
This commit is contained in:
2
Makefile
2
Makefile
@@ -55,7 +55,7 @@ tinyldap_debug: tinyldap.c
|
||||
clean:
|
||||
rm -f t t[1-9] *.[ao] bindrequest tinyldap ldapclient data \
|
||||
parse tinyldap_standalone tinyldap_debug ldapclient_str addindex \
|
||||
dumpidx
|
||||
dumpidx *.da *.bbg *.bb *.gcov gmon.out
|
||||
|
||||
tar: clean
|
||||
cd ..; tar cvvf ldap.tar.bz2 ldap --use=bzip2 --exclude CVS --exclude exp.ldif --exclude polyp* --exclude rfc*
|
||||
|
||||
10
tinyldap.c
10
tinyldap.c
@@ -176,15 +176,17 @@ static void tagmatches(uint32* index,unsigned int elements,struct string* s,unsi
|
||||
* Look before and after mid, too */
|
||||
for (oldk=k; k>0; ) {
|
||||
k-=4;
|
||||
if ((l=matchstring(s,map+k))==0)
|
||||
if ((l=matchstring(s,map+k))==0) {
|
||||
if ((rec=findrec(k)))
|
||||
setbit(bitfield,rec);
|
||||
} else break;
|
||||
}
|
||||
for (k=oldk; k<elements; ++k) {
|
||||
k+=4;
|
||||
if ((l=matchstring(s,map+k))==0)
|
||||
if ((l=matchstring(s,map+k))==0) {
|
||||
if ((rec=findrec(k)))
|
||||
setbit(bitfield,rec);
|
||||
} else break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -557,10 +559,6 @@ again:
|
||||
#ifdef DEBUG
|
||||
handle(asock,asock);
|
||||
close(asock);
|
||||
{
|
||||
static int count=0;
|
||||
if (++count==500) return 0;
|
||||
}
|
||||
goto again;
|
||||
// exit(0);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user