projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c043c6b
)
Fix lookup of of hashitem to hashpos: we have to use the indirect position not the...
author
Wilfried Goesgens
<dothebart@citadel.org>
Mon, 21 Nov 2011 18:23:42 +0000
(19:23 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Mon, 21 Nov 2011 21:06:01 +0000
(22:06 +0100)
libcitadel/lib/hash.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/hash.c
b/libcitadel/lib/hash.c
index d315358beae1115679872ef945c5ab54dbd1efc0..d4c2f5080f408b516c47ab98d800f5618beff19c 100644
(file)
--- a/
libcitadel/lib/hash.c
+++ b/
libcitadel/lib/hash.c
@@
-622,10
+622,10
@@
void Put(HashList *Hash, const char *HKey, long HKLen, void *Data, DeleteHashDat
/** oh, we're brand new... */
if (Hash->LookupTable[HashAt] == NULL) {
InsertHashItem(Hash, HashAt, HashBinKey, HKey, HKLen, Data, DeleteIt);
/** oh, we're brand new... */
if (Hash->LookupTable[HashAt] == NULL) {
InsertHashItem(Hash, HashAt, HashBinKey, HKey, HKLen, Data, DeleteIt);
- }/** Insert
After
? */
+ }/** Insert
Before
? */
else if (Hash->LookupTable[HashAt]->Key > HashBinKey) {
InsertHashItem(Hash, HashAt, HashBinKey, HKey, HKLen, Data, DeleteIt);
else if (Hash->LookupTable[HashAt]->Key > HashBinKey) {
InsertHashItem(Hash, HashAt, HashBinKey, HKey, HKLen, Data, DeleteIt);
- }/** Insert
before
? */
+ }/** Insert
After
? */
else if (Hash->LookupTable[HashAt]->Key < HashBinKey) {
InsertHashItem(Hash, HashAt + 1, HashBinKey, HKey, HKLen, Data, DeleteIt);
}
else if (Hash->LookupTable[HashAt]->Key < HashBinKey) {
InsertHashItem(Hash, HashAt + 1, HashBinKey, HKey, HKLen, Data, DeleteIt);
}
@@
-769,7
+769,7
@@
int GetHashPosFromKey(HashList *Hash, const char *HKey, long HKLen, HashPos *At)
return 0;
}
/** GOTCHA! */
return 0;
}
/** GOTCHA! */
- At->Position = Hash
->LookupTable[HashAt]->Position
;
+ At->Position = Hash
At
;
return 1;
}
return 1;
}