Experimental version.. Trying to move state information into URL parameters
[pazpar2-moved-to-github.git] / reclists.c
index 3a7ac5c..579e34b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: reclists.c,v 1.2 2006-11-26 05:15:43 quinn Exp $
+ * $Id: reclists.c,v 1.4 2006-12-08 21:40:58 quinn Exp $
  */
 
 #include <assert.h>
@@ -73,14 +73,13 @@ struct record *reclist_insert(struct reclist *l, struct record  *record)
     struct reclist_bucket **p;
     struct record *head;
 
-    bucket = hash(record->merge_key) & l->hashmask;
+    bucket = hash((unsigned char*) record->merge_key) & l->hashmask;
     for (p = &l->hashtable[bucket]; *p; p = &(*p)->next)
     {
         // We found a matching record. Merge them
         if (!strcmp(record->merge_key, (*p)->record->merge_key))
         {
             struct record *existing = (*p)->record;
-            yaz_log(YLOG_LOG, "Found a matching record: %s", record->merge_key);
             record->next_cluster = existing->next_cluster;
             existing->next_cluster = record;
             head = existing;
@@ -89,7 +88,6 @@ struct record *reclist_insert(struct reclist *l, struct record  *record)
     }
     if (!*p) // We made it to the end of the bucket without finding match
     {
-        yaz_log(YLOG_DEBUG, "Added a new record: %s", record->merge_key);
         struct reclist_bucket *new = nmem_malloc(l->nmem,
                 sizeof(struct reclist_bucket));
         new->record = record;