From: Heikki Levanto Date: Wed, 18 Dec 2013 10:37:29 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/pazpar2 X-Git-Tag: v1.6.38~12 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=4aa368ef32545c581183ea8de5ef92980351b850;hp=d705c4571cf65cbce17eefc2390d5bcacfe380aa;p=pazpar2-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/pazpar2 --- diff --git a/src/reclists.c b/src/reclists.c index f07a2cb..817c133 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -496,21 +496,19 @@ struct record_cluster *reclist_insert(struct reclist *l, // We found a matching record. Merge them if (!strcmp(merge_key, mkr->value)) { - struct record **re; - rb = *p; - for (re = &rb->record->records; *re; re = &(*re)->next) + if (!cluster) { - if ((*re)->client == record->client && - record_compare(record, *re, service)) + struct record **re; + for (re = &rb->record->records; *re; re = &(*re)->next) { - yaz_mutex_leave(l->mutex); - return 0; + if ((*re)->client == record->client && + record_compare(record, *re, service)) + { + yaz_mutex_leave(l->mutex); + return 0; + } } - } - - if (!cluster) - { cluster = rb->record; *re = record; record->next = 0; diff --git a/test/run_pazpar2.sh b/test/run_pazpar2.sh index 49ae5e8..f2e3de5 100755 --- a/test/run_pazpar2.sh +++ b/test/run_pazpar2.sh @@ -121,7 +121,7 @@ if test "$ztest" = "true" ; then fi rm -f ztest.pid rm -f ${PREFIX}_ztest.log - $F -l ${PREFIX}_ztest.log -a ztest_apdu.log -p ztest.pid -D tcp:localhost:9999 + $F -l ${PREFIX}_ztest.log -p ztest.pid -D tcp:localhost:9999 sleep 1 if test ! -f ztest.pid; then echo "yaz-ztest could not be started" diff --git a/test/test_cluster_9.res b/test/test_cluster_9.res index 0b6bbcc..d47758f 100644 --- a/test/test_cluster_9.res +++ b/test/test_cluster_9.res @@ -1,10 +1,10 @@ OK 0 -2 +1 4 0 -2 +1 Jack Collins book @@ -31,15 +31,6 @@ 1995 How to program a computer vol4 - 3 - 0 - content: author jack collins medium book title how to program a computer vol1 - - - Jack Collins - book - 1995 - How to program a computer vol3 Jack Collins @@ -54,8 +45,8 @@ 1995 How to program a computer vol4 - 2 + 5 0 - content: author jack collins medium book title how to program a computer vol3 + content: author jack collins medium book title how to program a computer vol1 \ No newline at end of file