From: Adam Dickmeiss Date: Wed, 28 Aug 2013 07:49:59 +0000 (+0200) Subject: ZOOM: mark record cache with schema as requested X-Git-Tag: v4.2.66~11 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=ba45bd82e84e9a83e0e3a09d879bbee62cd22e38 ZOOM: mark record cache with schema as requested rather than the one returned in record structure. The problem is that schema returned by SRU/Solr server may not be present.. So best assumption is to assume schema as requested. This should fix YAZ-675 . --- diff --git a/src/zoom-sru.c b/src/zoom-sru.c index b997eeb..b829738 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -247,7 +247,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, NMEM nmem; ZOOM_Event event; int *start, *count; - const char *syntax, *elementSetName; + const char *syntax, *elementSetName, *schema; if (!c->tasks) return zoom_complete; @@ -260,7 +260,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, count = &c->tasks->u.search.count; syntax = c->tasks->u.search.syntax; elementSetName = c->tasks->u.search.elementSetName; - + schema = c->tasks->u.search.schema; /* Required not for reporting client hit count multiple times into session */ if (!c->tasks->u.search.recv_search_fired) { yaz_log(YLOG_DEBUG, "posting ZOOM_EVENT_RECV_SEARCH"); @@ -277,6 +277,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, count = &c->tasks->u.retrieve.count; syntax = c->tasks->u.retrieve.syntax; elementSetName = c->tasks->u.retrieve.elementSetName; + schema = c->tasks->u.retrieve.schema; break; default: return zoom_complete; @@ -346,7 +347,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, resultset->odr); } ZOOM_record_cache_add(resultset, npr, pos, syntax, elementSetName, - sru_rec->recordSchema, diag); + schema, diag); } *count -= i; *start += i;