X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-proxy.cpp;h=45fe382e9b9a772b0f8fa8b4c5e1b197e0259356;hb=094d6eb1e3f699fee222a542eda4959e58f7a3cb;hp=c1cc98f352336ee75690f46e97890877b8ebde48;hpb=eb2b00deb4ecc5a3fbfbef11f57790c1659ab3e2;p=yazproxy-moved-to-github.git diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index c1cc98f..45fe382 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -1,4 +1,4 @@ -/* $Id: yaz-proxy.cpp,v 1.29 2005-06-02 06:40:46 adam Exp $ +/* $Id: yaz-proxy.cpp,v 1.31 2005-06-10 17:54:11 adam Exp $ Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -145,11 +145,11 @@ static const char *gdu_name(Z_GDU *gdu) return "Unknown request/response"; } -Yaz_Proxy::Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable, - IYazSocketObservable *the_socket_observable, +Yaz_Proxy::Yaz_Proxy(IPDU_Observable *the_PDU_Observable, + ISocketObservable *the_socket_observable, Yaz_Proxy *parent) : - Yaz_Z_Assoc(the_PDU_Observable), m_bw_stat(60), m_pdu_stat(60) + Z_Assoc(the_PDU_Observable), m_bw_stat(60), m_pdu_stat(60) { m_PDU_Observable = the_PDU_Observable; m_socket_observable = the_socket_observable; @@ -338,8 +338,8 @@ Yaz_ProxyConfig *Yaz_Proxy::check_reconfigure() return cfg; } -IYaz_PDU_Observer *Yaz_Proxy::sessionNotify(IYaz_PDU_Observable - *the_PDU_Observable, int fd) +IPDU_Observer *Yaz_Proxy::sessionNotify(IPDU_Observable + *the_PDU_Observable, int fd) { check_reconfigure(); Yaz_Proxy *new_proxy = new Yaz_Proxy(the_PDU_Observable, @@ -2682,13 +2682,15 @@ void Yaz_Proxy::handle_init(Z_APDU *apdu) m_initRequest_maximumRecordSize = *apdu->u.initRequest-> maximumRecordSize; *apdu->u.initRequest->maximumRecordSize = 1024*1024; + + Z_CharSetandLanguageNegotiation *charSetandLangRecord = + yaz_get_charneg_record(*oi); // Save proposal charsets and langs. if (ODR_MASK_GET(apdu->u.initRequest->options, - Z_Options_negotiationModel)) + Z_Options_negotiationModel) + && charSetandLangRecord) { - Z_CharSetandLanguageNegotiation *charSetandLangRecord = - yaz_get_charneg_record(*oi); yaz_get_proposal_charneg(m_referenceId_mem, charSetandLangRecord, @@ -2975,8 +2977,8 @@ void Yaz_ProxyClient::connectNotify() pre_init_client(); } -IYaz_PDU_Observer *Yaz_ProxyClient::sessionNotify(IYaz_PDU_Observable - *the_PDU_Observable, int fd) +IPDU_Observer *Yaz_ProxyClient::sessionNotify(IPDU_Observable + *the_PDU_Observable, int fd) { return new Yaz_ProxyClient(the_PDU_Observable, 0); } @@ -3177,9 +3179,9 @@ void Yaz_ProxyClient::timeoutNotify() shutdown(); } -Yaz_ProxyClient::Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable, +Yaz_ProxyClient::Yaz_ProxyClient(IPDU_Observable *the_PDU_Observable, Yaz_Proxy *parent) : - Yaz_Z_Assoc (the_PDU_Observable) + Z_Assoc (the_PDU_Observable) { m_cookie = 0; m_next = 0; @@ -3364,7 +3366,7 @@ void Yaz_Proxy::low_socket_open() int Yaz_Proxy::server(const char *addr) { - int r = Yaz_Z_Assoc::server(addr); + int r = Z_Assoc::server(addr); if (!r) { yaz_log(YLOG_LOG, "%sStarted proxy "