From: Adam Dickmeiss Date: Wed, 25 Sep 2002 20:41:02 +0000 (+0000) Subject: Negotiated charset and languages saved in connection X-Git-Tag: YAZ.1.9.1~11 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=bdcf00f7ba08b06323fbf8e1679c947316100ad3;p=yaz-moved-to-github.git Negotiated charset and languages saved in connection options negotiation-{charset,lang}. --- diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index b220b01..a620a95 100644 --- a/zutil/zoom-c.c +++ b/zutil/zoom-c.c @@ -1,5 +1,5 @@ /* - * $Id: zoom-c.c,v 1.2 2002-09-24 08:05:42 adam Exp $ + * $Id: zoom-c.c,v 1.3 2002-09-25 20:41:02 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -2035,10 +2035,15 @@ static void handle_apdu (ZOOM_connection c, Z_APDU *apdu) int sel; yaz_get_response_charneg(tmpmem, p, &charset, &lang, &sel); - yaz_log(LOG_DEBUG, "Target accepted: charset - %s," - "language - %s, select - %d", - charset, lang, sel); - + yaz_log(LOG_DEBUG, "Target accepted: charset %s, " + "language %s, select %d", + charset ? charset : "none", lang ? lang : "none", sel); + if (charset) + ZOOM_connection_option_set (c, "negotiation-charset", + charset); + if (lang) + ZOOM_connection_option_set (c, "negotiation-lang", + lang); nmem_destroy(tmpmem); } }