X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-proxy.cpp;h=c0c24d0128e197a42225bcfe34c2b897731e19a0;hb=1c579e7c96bf635658b0b1729cbf8c0a3b223b1a;hp=228bbd4fbc899c6d956c409357e0b4bb17d7c12a;hpb=b4fc3004d73a0e964a99ef8641acc3ad9943fce1;p=yazpp-moved-to-github.git diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 228bbd4..c0c24d0 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy.cpp,v 1.40 2003-06-11 08:22:18 adam Exp $ + * $Id: yaz-proxy.cpp,v 1.43 2003-06-25 21:57:45 adam Exp $ */ #include @@ -402,6 +402,24 @@ static const char *apdu_name(Z_APDU *apdu) return "presentRequest"; case Z_APDU_presentResponse: return "presentResponse"; + case Z_APDU_deleteResultSetRequest: + return "deleteResultSetRequest"; + case Z_APDU_deleteResultSetResponse: + return "deleteResultSetResponse"; + case Z_APDU_scanRequest: + return "scanRequest"; + case Z_APDU_scanResponse: + return "scanResponse"; + case Z_APDU_sortRequest: + return "sortRequest"; + case Z_APDU_sortResponse: + return "sortResponse"; + case Z_APDU_extendedServicesRequest: + return "extendedServicesRequest"; + case Z_APDU_extendedServicesResponse: + return "extendedServicesResponse"; + case Z_APDU_close: + return "close"; } return "other"; } @@ -424,7 +442,7 @@ void Yaz_Proxy::recv_Z_PDU(Z_APDU *apdu) { Z_APDU *apdu = m_client->m_initResponse; apdu->u.initResponse->otherInfo = 0; - if (m_client->m_cookie) + if (m_client->m_cookie && *m_client->m_cookie) set_otherInformationString(apdu, VAL_COOKIE, 1, m_client->m_cookie); send_Z_PDU(apdu); @@ -615,4 +633,8 @@ void Yaz_ProxyClient::recv_Z_PDU(Z_APDU *apdu) yaz_log (LOG_LOG, "Sending %s to client", apdu_name(apdu)); m_server->send_Z_PDU(apdu); } + if (apdu->which == Z_APDU_close) + { + shutdown(); + } }