From: Adam Dickmeiss Date: Fri, 1 Jun 2012 07:04:01 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz X-Git-Tag: v4.2.34~7 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;h=ccb71a41bee3e0438d4a660fad5e4d98f4e140e4;hp=665d20fd5ce32ae2177ed17ace8a893aec375bb1;p=yaz-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz --- diff --git a/doc/common b/doc/common index ca8f04f..c6e4db9 160000 --- a/doc/common +++ b/doc/common @@ -1 +1 @@ -Subproject commit ca8f04fe52cd2cb481af6fac38a15bc12ad8c530 +Subproject commit c6e4db90ce6779ee42fafd38e776176d38c2844b diff --git a/src/solr.c b/src/solr.c index de46b5f..475f615 100644 --- a/src/solr.c +++ b/src/solr.c @@ -90,8 +90,6 @@ static void yaz_solr_decode_result_docs(ODR o, xmlNodePtr ptr, record->recordData_buf = odr_malloc(o, buf->use + 1); memcpy(record->recordData_buf, buf->content, buf->use); record->recordData_buf[buf->use] = '\0'; - // TODO Solve the real problem in zoom-sru, that doesnt work with 0-based indexes. - // Work-around: Making the recordPosition 1-based. record->recordPosition = odr_intdup(o, start + offset + 1); xmlBufferFree(buf); diff --git a/src/zoom-sru.c b/src/zoom-sru.c index d7f19cb..c38cee6 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -320,10 +320,8 @@ static zoom_ret handle_srw_response(ZOOM_connection c, Z_NamePlusRecord *npr = (Z_NamePlusRecord *) odr_malloc(c->odr_in, sizeof(Z_NamePlusRecord)); - /* - * TODO This does not work with 0-based recordPositions. - * We will iterate over one twice - */ + + /* recordPosition is 1 based */ if (res->records[i].recordPosition && *res->records[i].recordPosition > 0) pos = *res->records[i].recordPosition - 1;