X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Freclists.c;h=e0bf96d4a5294a898cad0865bbcd03f8ee2d3346;hb=3239723e5b6d9f2aa9de8267bca17e7a01c38359;hp=a1e104c46ff84cde344c9ae575ee46f2f92025f4;hpb=8ca1269eac32c1ddc19d16dc4f74e9a1e3e0b8f9;p=pazpar2-moved-to-github.git diff --git a/src/reclists.c b/src/reclists.c index a1e104c..e0bf96d 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -1,5 +1,22 @@ -/* - * $Id: reclists.c,v 1.7 2007-01-15 04:34:28 quinn Exp $ +/* $Id: reclists.c,v 1.10 2007-04-16 13:57:25 marc Exp $ + Copyright (c) 2006-2007, Index Data. + +This file is part of Pazpar2. + +Pazpar2 is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Pazpar2; see the file LICENSE. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ #include @@ -187,13 +204,18 @@ struct reclist *reclist_create(NMEM nmem, int numrecs) } // Insert a record. Return record cluster (newly formed or pre-existing) -struct record_cluster *reclist_insert(struct reclist *l, struct record *record, - char *merge_key, int *total) +struct record_cluster *reclist_insert( struct conf_service *service, + struct reclist *l, + struct record *record, + char *merge_key, int *total) { unsigned int bucket; struct reclist_bucket **p; struct record_cluster *cluster = 0; - struct conf_service *service = global_parameters.server->service; + + assert(service); + assert(service->num_metadata); + assert(service->num_sortkeys); bucket = hash((unsigned char*) merge_key) & l->hashmask; for (p = &l->hashtable[bucket]; *p; p = &(*p)->next)