From: Adam Dickmeiss Date: Thu, 22 Aug 2013 08:28:58 +0000 (+0200) Subject: Fix record caching problem YAZ-673 X-Git-Tag: v4.2.65~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d82c199341382ab78de758b2afc0040f1514d271;p=yaz-moved-to-github.git Fix record caching problem YAZ-673 Problem introduced in YAZ 4.2.64. --- diff --git a/src/zoom-z3950.c b/src/zoom-z3950.c index fd605f5..797ffb3 100644 --- a/src/zoom-z3950.c +++ b/src/zoom-z3950.c @@ -1330,7 +1330,7 @@ static void handle_Z3950_records(ZOOM_connection c, Z_Records *sr, { ZOOM_resultset resultset; int *start, *count; - const char *syntax = 0, *elementSetName = 0; + const char *syntax = 0, *elementSetName = 0, *schema = 0; if (!c->tasks) return ; @@ -1342,6 +1342,7 @@ static void handle_Z3950_records(ZOOM_connection c, Z_Records *sr, count = &c->tasks->u.search.count; syntax = c->tasks->u.search.syntax; elementSetName = c->tasks->u.search.elementSetName; + schema = c->tasks->u.search.schema; break; case ZOOM_TASK_RETRIEVE: resultset = c->tasks->u.retrieve.resultset; @@ -1349,6 +1350,7 @@ static void handle_Z3950_records(ZOOM_connection c, Z_Records *sr, 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; @@ -1377,8 +1379,7 @@ static void handle_Z3950_records(ZOOM_connection c, Z_Records *sr, for (i = 0; inum_records; i++) { ZOOM_record_cache_add(resultset, p->records[i], i + *start, - syntax, elementSetName, - elementSetName, 0); + syntax, elementSetName, schema, 0); } *count -= i; if (*count < 0) @@ -1400,7 +1401,7 @@ static void handle_Z3950_records(ZOOM_connection c, Z_Records *sr, YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS, "ZOOM C generated. Present phase and no records"); ZOOM_record_cache_add(resultset, myrec, *start, - syntax, elementSetName, 0, 0); + syntax, elementSetName, schema, 0); } } else if (present_phase) @@ -1412,7 +1413,7 @@ static void handle_Z3950_records(ZOOM_connection c, Z_Records *sr, YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS, "ZOOM C generated: Present response and no records"); ZOOM_record_cache_add(resultset, myrec, *start, - syntax, elementSetName, 0, 0); + syntax, elementSetName, schema, 0); } } }