X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Fzoom-c.c;h=e94a9a9fcd3f886bb61f1ab956c1dc463ea940a1;hb=72d53a9d929783e997c41330bb28859018088b53;hp=b220b01658bd1dfbef316c9a806fab5f20d7379e;hpb=165b231b0f6eaa0b2b5fbf438f5ddede630b10e3;p=yaz-moved-to-github.git diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index b220b01..e94a9a9 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.4 2002-10-04 11:23:50 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -1143,7 +1143,7 @@ ZOOM_record_get (ZOOM_record rec, const char *type, int *len) r->u.octet_aligned->buf, rec->wrbuf_marc, 0, r->u.octet_aligned->len, - 1) > 0) + 2) > 0) { if (len) *len = wrbuf_len(rec->wrbuf_marc); return wrbuf_buf(rec->wrbuf_marc); @@ -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); } }