From 64a4f78d5566927b12b374157edf72f68232ffa3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 14 Feb 2004 15:44:15 +0000 Subject: [PATCH] Added init command for yaz-client which sends extra init request --- CHANGELOG | 2 ++ client/client.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a377105..664fc6f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ Possible compatibility problems with earlier versions marked with '*'. +Added init command for yaz-client which sends "extra" init request. + Fixed two bugs in OID codec - ber_oidc. Throw error when encoding/decoding bad truncated OID. Fix decoding of OID X.Y... when X=2 and Y>39. diff --git a/client/client.c b/client/client.c index 90d3e94..f3b896c 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.228 2004-01-27 21:22:43 adam Exp $ + * $Id: client.c,v 1.229 2004-02-14 15:44:15 adam Exp $ */ #include @@ -296,7 +296,7 @@ static void send_initRequest(const char* type_and_host) req->referenceId = set_refid (out); - if (yazProxy) + if (yazProxy && type_and_host) yaz_oi_set_string_oidval(&req->otherInfo, out, VAL_PROXY, 1, type_and_host); @@ -2154,7 +2154,15 @@ static int cmd_explain(const char *arg) #endif return 0; } - + +static int cmd_init(const char *arg) +{ + if (!conn || protocol != PROTO_Z3950) + return 0; + send_initRequest(0); + return 2; +} + static int cmd_find(const char *arg) { if (!*arg) @@ -3812,6 +3820,7 @@ static struct { {"options", cmd_options, "", NULL, 0, NULL}, {"zversion", cmd_zversion, "", NULL, 0, NULL}, {"help", cmd_help, "", NULL,0,NULL}, + {"init", cmd_init, "", NULL,0,NULL}, {0,0,0,0,0,0} }; -- 1.7.10.4