X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Freclists.c;h=6ac71cddbcff3fc6527584d49214d2ed162f2a94;hb=050c132e37fd994ed176952829b37cc9a9131282;hp=99c9c8732260c3a0180fe51dbcbeea89d9b364e5;hpb=646158a86d80e5ef0221ef7d7ce2cfc6ba31eacc;p=pazpar2-moved-to-github.git diff --git a/src/reclists.c b/src/reclists.c index 99c9c87..6ac71cd 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -314,6 +314,17 @@ struct record_cluster *reclist_insert(struct reclist *l, if (!strcmp(merge_key, (*p)->record->merge_key)) { struct record_cluster *existing = (*p)->record; + struct record *re = existing->records; + + for (; re; re = re->next) + { + if (re->client == record->client && + record_compare(record, re, service)) + { + yaz_mutex_leave(l->mutex); + return 0; + } + } record->next = existing->records; existing->records = record; cluster = existing;