From: Adam Dickmeiss Date: Wed, 30 May 2012 07:51:18 +0000 (+0200) Subject: Remove comments about recordPosition in ZOOM X-Git-Tag: v4.2.34~7^2 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=6c674d1fb42e36b8fd7afe9da2a1f914b23063ad;p=yaz-moved-to-github.git Remove comments about recordPosition in ZOOM --- 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;