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.
* 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 <stdio.h>
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);
#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)
{"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}
};