X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fseshigh.c;h=23b7fe5242ffb89f8ebbf9a67827fd91c8033b50;hp=55283258cf7c501a48af476a80cabe60d0a735cc;hb=0f88139455a3aeffeca0a5650ca5d3d99abc1c17;hpb=f2b3c045e79a30c889ffdddb408d9d08ab8d7e01 diff --git a/src/seshigh.c b/src/seshigh.c index 5528325..23b7fe5 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ /** @@ -509,6 +509,7 @@ static void assoc_init_reset(association *assoc) assoc->init->bend_explain = NULL; assoc->init->bend_srw_scan = NULL; assoc->init->bend_srw_update = NULL; + assoc->init->named_result_sets = 0; assoc->init->charneg_request = NULL; assoc->init->charneg_response = NULL; @@ -2198,6 +2199,10 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->charneg_request = negotiation; } + /* by default named_result_sets is 0 .. Enable it if client asks for it. */ + if (ODR_MASK_GET(req->options, Z_Options_namedResultSets)) + assoc->init->named_result_sets = 1; + assoc->backend = 0; if (cb) { @@ -2264,7 +2269,8 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) ODR_MASK_SET(resp->options, Z_Options_extendedServices); strcat(options, " extendedServices"); } - if (ODR_MASK_GET(req->options, Z_Options_namedResultSets)) + if (ODR_MASK_GET(req->options, Z_Options_namedResultSets) + && assoc->init->named_result_sets) { ODR_MASK_SET(resp->options, Z_Options_namedResultSets); strcat(options, " namedresults"); @@ -3524,6 +3530,7 @@ int bend_assoc_is_alive(bend_association assoc) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab