From: Adam Dickmeiss Date: Wed, 28 Apr 1999 13:04:03 +0000 (+0000) Subject: Fixed setting of proxy otherInfo so that database(s) are removed. X-Git-Tag: YAZPP.0.3~100 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=e08f9ff89133cbc295dda92b9c863ddd288569d1;p=yazpp-moved-to-github.git Fixed setting of proxy otherInfo so that database(s) are removed. --- diff --git a/src/yaz-ir-assoc.cpp b/src/yaz-ir-assoc.cpp index a88888d..ef084a1 100644 --- a/src/yaz-ir-assoc.cpp +++ b/src/yaz-ir-assoc.cpp @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-ir-assoc.cpp,v $ - * Revision 1.7 1999-04-21 12:09:01 adam + * Revision 1.8 1999-04-28 13:04:03 adam + * Fixed setting of proxy otherInfo so that database(s) are removed. + * + * Revision 1.7 1999/04/21 12:09:01 adam * Many improvements. Modified to proxy server to work with "sessions" * based on cookies. * @@ -369,7 +372,15 @@ int Yaz_IR_Assoc::send_initRequest() ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_3); if (m_proxy && m_host) - set_otherInformationString(&req->otherInfo, VAL_PROXY, 1, m_host); + { + char *rawhost = new char[strlen(m_host)+1]; + strcpy(rawhost, m_host); + char *dbpart = strchr(rawhost, '/'); + if (dbpart) + *dbpart = '\0'; + set_otherInformationString(&req->otherInfo, VAL_PROXY, 1, rawhost); + delete [] rawhost; + } if (m_cookie) set_otherInformationString(&req->otherInfo, VAL_COOKIE, 1, m_cookie); return send_Z_PDU(apdu); diff --git a/src/yaz-pdu-assoc.cpp b/src/yaz-pdu-assoc.cpp index 744e793..c7475fc 100644 --- a/src/yaz-pdu-assoc.cpp +++ b/src/yaz-pdu-assoc.cpp @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-pdu-assoc.cpp,v $ - * Revision 1.7 1999-04-21 12:09:01 adam + * Revision 1.8 1999-04-28 13:04:03 adam + * Fixed setting of proxy otherInfo so that database(s) are removed. + * + * Revision 1.7 1999/04/21 12:09:01 adam * Many improvements. Modified to proxy server to work with "sessions" * based on cookies. * @@ -344,7 +347,7 @@ void Yaz_PDU_Assoc::connect(IYaz_PDU_Observer *observer, int res = cs_connect (cs, ap); if (res < 0) { - logf (LOG_LOG, "Yaz_PDU_Assoc::connect failed"); + logf (LOG_LOG|LOG_ERRNO, "Yaz_PDU_Assoc::connect failed"); #if 1 logf (LOG_LOG, "Yaz_PDU_Assoc::connect fd=%d", cs_fileno(cs)); m_socketObservable->addObserver(cs_fileno(cs), this);