From: Adam Dickmeiss Date: Thu, 6 Apr 2006 17:23:14 +0000 (+0000) Subject: Supply YAZ Proxy version in Z39.50 init responses X-Git-Tag: YAZPROXY.1.1.0.2~9 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=b276287e0e21b0bb267c5d5a7d87254ee1f5e29f;p=yazproxy-moved-to-github.git Supply YAZ Proxy version in Z39.50 init responses --- diff --git a/etc/voyager.xml b/etc/voyager.xml index ce55a62..1e9bbcb 100644 --- a/etc/voyager.xml +++ b/etc/voyager.xml @@ -1,5 +1,5 @@ - + --> 10 5 + doc diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 5de2824..151a57c 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -1,4 +1,4 @@ -/* $Id: yaz-proxy.cpp,v 1.51 2006-04-06 16:25:21 adam Exp $ +/* $Id: yaz-proxy.cpp,v 1.52 2006-04-06 17:23:14 adam Exp $ Copyright (c) 1998-2006, Index Data. This file is part of the yazproxy. @@ -3577,8 +3577,19 @@ void Yaz_ProxyClient::recv_Z_PDU(Z_APDU *apdu, int len) *apdu->u.initResponse->maximumRecordSize; Z_InitResponse *ir = apdu->u.initResponse; + + // apply YAZ Proxy version + char *imv0 = ir->implementationVersion; + char *imv1 = (char*) + odr_malloc(m_init_odr, 20 + (imv0 ? strlen(imv0) : 0)); + *imv1 = '\0'; + if (imv0) + strcat(imv1, imv0); + strcat(imv1, "/" VERSION); + ir->implementationVersion = imv1; + + // apply YAZ Proxy implementation name char *im0 = ir->implementationName; - char *im1 = (char*) odr_malloc(m_init_odr, 20 + (im0 ? strlen(im0) : 0)); *im1 = '\0';