@@ -168,9 +168,9 @@ void OpenResponseArea() {
168168/*
169169 * Compare function for KVIterHash
170170 */
171- /* int CompareKVIterHashKey(const void *key1, const void *key2, Size keysize) {
172- KVIterHashKey *k1 = (const KVIterHashKey *)key1;
173- KVIterHashKey *k2 = (const KVIterHashKey *)key2;
171+ int CompareKVIterHashKey (const void * key1 , const void * key2 , Size keysize ) {
172+ const KVIterHashKey * k1 = (const KVIterHashKey * )key1 ;
173+ const KVIterHashKey * k2 = (const KVIterHashKey * )key2 ;
174174
175175 if (k1 == NULL || k2 == NULL ) {
176176 return -1 ;
@@ -181,7 +181,7 @@ void OpenResponseArea() {
181181 }
182182
183183 return -1 ;
184- }*/
184+ }
185185
186186void * KVStorageThreadFun (void * arg ) {
187187 PthreadSetCancelState (PTHREAD_CANCEL_ENABLE , NULL , __func__ );
@@ -259,13 +259,13 @@ static void KVWorkerMain(int argc, char *argv[]) {
259259 memset (& iterhash_ctl , 0 , sizeof (iterhash_ctl ));
260260 iterhash_ctl .keysize = sizeof (KVIterHashKey );
261261 iterhash_ctl .entrysize = sizeof (KVIterHashEntry );
262- // iterhash_ctl.match = CompareKVIterHashKey;
262+ iterhash_ctl .match = CompareKVIterHashKey ;
263263 kvIterHash = hash_create ("kvIterHash" ,
264264 HASHSIZE ,
265265 & iterhash_ctl ,
266- HASH_ELEM | HASH_BLOBS );
266+ HASH_ELEM | HASH_COMPARE );
267267
268- char buff [DATAAREASIZE ];
268+ char buff [BUFSIZE ];
269269 do {
270270 SemWait (& ptr -> worker , __func__ );
271271
0 commit comments