X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzoom-sru.c;h=bf89a4494fc51265920510ddbda00337298a8ece;hp=17f7c180a280f96d2ccbd3dfa01bc463f4d6136f;hb=4d1450cc691292cef5bcfdd41cefc030e4dabbf6;hpb=c95d4ba97774c6feff8579544c36bf22b5d35976 diff --git a/src/zoom-sru.c b/src/zoom-sru.c index 17f7c18..bf89a44 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -391,14 +391,14 @@ static zoom_ret handle_srw_response(ZOOM_connection c, #endif #if YAZ_HAVE_XML2 -static void handle_srw_scan_response(ZOOM_connection c, - Z_SRW_scanResponse *res) +static zoom_ret handle_srw_scan_response(ZOOM_connection c, + Z_SRW_scanResponse *res) { NMEM nmem = odr_extract_mem(c->odr_in); ZOOM_scanset scan; if (!c->tasks || c->tasks->which != ZOOM_TASK_SCAN) - return; + return zoom_complete; scan = c->tasks->u.scan.scan; if (res->num_diagnostics > 0) @@ -410,6 +410,7 @@ static void handle_srw_scan_response(ZOOM_connection c, ZOOM_options_set_int(scan->options, "number", res->num_terms); nmem_destroy(nmem); + return zoom_complete; } #endif @@ -434,7 +435,7 @@ int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres, if (sr->which == Z_SRW_searchRetrieve_response) *cret = handle_srw_response(c, sr->u.response); else if (sr->which == Z_SRW_scan_response) - handle_srw_scan_response(c, sr->u.scan_response); + *cret = handle_srw_scan_response(c, sr->u.scan_response); } } else @@ -460,7 +461,7 @@ int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres, if (sr->which == Z_SRW_searchRetrieve_response) *cret = handle_srw_response(c, sr->u.response); else if (sr->which == Z_SRW_scan_response) - handle_srw_scan_response(c, sr->u.scan_response); + *cret = handle_srw_scan_response(c, sr->u.scan_response); else ret = -1; }