X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=client%2Fclient.c;h=f354979298c14ab1605e138a66cd40857d9b54fc;hb=1533023386c841cac9832a246e871795a2b217fc;hp=da0fd366ef04e133e6f0566ef7db54d4481bced4;hpb=0380a06a86927164ff17500bcf7c3b54fd5428c4;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index da0fd36..f354979 100644 --- a/client/client.c +++ b/client/client.c @@ -702,10 +702,7 @@ static int session_connect_base(const char *arg, const char **basep) strncpy(type_and_host, arg, sizeof(type_and_host)-1); type_and_host[sizeof(type_and_host)-1] = '\0'; - if (yazProxy) - conn = cs_create_host(yazProxy, 1, &add); - else - conn = cs_create_host(arg, 1, &add); + conn = cs_create_host_proxy(arg, 1, &add, yazProxy); if (!conn) { printf("Could not resolve address %s\n", arg); @@ -932,7 +929,7 @@ static void display_record(Z_External *r) print_xml_record(octet_buf, octet_len); } - else if (yaz_oid_is_iso2709(oid)) + else { const char *result; size_t rlen; @@ -978,17 +975,14 @@ static void display_record(Z_External *r) } else { - printf("bad MARC. Dumping as it is:\n"); + if (yaz_oid_is_iso2709(oid)) + printf("bad MARC. Dumping as it is:\n"); print_record(octet_buf, octet_len); } yaz_marc_destroy(mt); if (cd) yaz_iconv_close(cd); } - else - { - print_record(octet_buf, octet_len); - } marc_file_write(octet_buf, r->u.octet_aligned->len); } else if (oid && !oid_oidcmp(oid, yaz_oid_recsyn_sutrs)) @@ -4448,7 +4442,7 @@ static void http_response(Z_HTTP_Response *hres) handle_srw_scan_response(sr->u.scan_response); else { - printf("Decoding of SOLR package failed\n"); + printf("Decoding of Solr package failed\n"); ret = -1; } odr_destroy(o);