X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-ir-assoc.cpp;h=0978e060c521bd5f3f74f5e85ed53299b1e37d8d;hp=e93694d4f29f3aa0e43cd69d11ec24b175373814;hb=d62e0baee8ee3cccced41746ef09fc3e01f401d5;hpb=0084c40d8bc6babaeb0b833b12d9cd625c807525 diff --git a/src/yaz-ir-assoc.cpp b/src/yaz-ir-assoc.cpp index e93694d..0978e06 100644 --- a/src/yaz-ir-assoc.cpp +++ b/src/yaz-ir-assoc.cpp @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2012 Index Data and Mike Taylor + * Copyright (C) Index Data and Mike Taylor * See the file LICENSE for details. */ @@ -95,7 +95,7 @@ void IR_Assoc::set_databaseNames(const char *dblist, const char *sep) void IR_Assoc::set_preferredRecordSyntax (const char *syntax) { xfree(m_preferredRecordSyntax); - m_preferredRecordSyntax = 0; + m_preferredRecordSyntax = 0; if (syntax && *syntax) m_preferredRecordSyntax = xstrdup(syntax); } @@ -165,7 +165,7 @@ void IR_Assoc::recv_Z_PDU(Z_APDU *apdu, int len) recv_searchRequest(apdu->u.searchRequest); break; case Z_APDU_searchResponse: - yaz_log (m_log, "recv searchResponse"); + yaz_log (m_log, "recv searchResponse"); recv_searchResponse(apdu->u.searchResponse); break; case Z_APDU_presentRequest: @@ -206,7 +206,7 @@ int IR_Assoc::send_searchRequest(Yaz_Z_Query *query, assert (req->otherInfo == 0); if (m_cookie) { - set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, + set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, 1, m_cookie); assert (req->otherInfo); } @@ -224,8 +224,8 @@ int IR_Assoc::send_searchRequest(Yaz_Z_Query *query, return send_Z_PDU(apdu, 0); } -int IR_Assoc::send_presentRequest(Odr_int start, - Odr_int number, +int IR_Assoc::send_presentRequest(Odr_int start, + Odr_int number, char* pResultSetId, char* pRefId) { @@ -254,7 +254,7 @@ int IR_Assoc::send_presentRequest(Odr_int start, } if (m_cookie) - set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, + set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, 1, m_cookie); if ( pRefId ) @@ -366,7 +366,7 @@ int IR_Assoc::send_initRequest(char* pRefId) { Z_APDU *apdu = create_Z_PDU(Z_APDU_initRequest); Z_InitRequest *req = apdu->u.initRequest; - + ODR_MASK_SET(req->options, Z_Options_search); ODR_MASK_SET(req->options, Z_Options_present); ODR_MASK_SET(req->options, Z_Options_namedResultSets); @@ -386,10 +386,10 @@ int IR_Assoc::send_initRequest(char* pRefId) } if (m_proxy && m_host) - set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_proxy, + set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_proxy, 1, m_host); if (m_cookie) - set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, + set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, 1, m_cookie); return send_Z_PDU(apdu, 0); } @@ -412,17 +412,17 @@ int IR_Assoc::send_deleteResultSetRequest(char* pResultSetId, char* pRefId) { *req->deleteFunction = Z_DeleteResultSetRequest_all; } - + if ( pRefId ) { req->referenceId = getRefID(pRefId); } if (m_proxy && m_host) - set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_proxy, + set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_proxy, 1, m_host); if (m_cookie) - set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, + set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie, 1, m_cookie); return send_Z_PDU(apdu, 0);