From: Adam Dickmeiss Date: Tue, 29 Oct 2013 12:25:18 +0000 (+0100) Subject: yaz-client: fix setting of SRU record schema X-Git-Tag: v5.0.3~15 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=226063abdf1fadf1850eb6a7a19cc71a9bb1c8bf;p=yaz-moved-to-github.git yaz-client: fix setting of SRU record schema If scheme was unset, it could lead to invalid memory reference. --- diff --git a/client/client.c b/client/client.c index 8043be1..b404ae2 100644 --- a/client/client.c +++ b/client/client.c @@ -1524,8 +1524,7 @@ static int send_SRW_searchRequest(const char *arg) sru_maximumRecords = 0; sr->u.request->maximumRecords = odr_intdup(out, 0); sr->u.request->facetList = facet_list; - if (record_schema) - sr->u.request->recordSchema = record_schema; + sr->u.request->recordSchema = record_schema; if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml")) sr->u.request->recordPacking = "xml"; return send_srw(sr); @@ -3185,8 +3184,7 @@ static int send_SRW_presentRequest(const char *arg) sr->u.request->startRecord = odr_intdup(out, setno); sru_maximumRecords = nos; sr->u.request->maximumRecords = odr_intdup(out, nos); - if (record_schema) - sr->u.request->recordSchema = record_schema; + sr->u.request->recordSchema = record_schema; if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml")) sr->u.request->recordPacking = "xml"; return send_srw(sr);