projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added 'check only' option for MARC utilities. Option -n for yaz-marcdump
[yaz-moved-to-github.git]
/
src
/
zoom-c.c
diff --git
a/src/zoom-c.c
b/src/zoom-c.c
index
93f807f
..
dd62ea7
100644
(file)
--- a/
src/zoom-c.c
+++ b/
src/zoom-c.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2006, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2006, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.99 2006-11-20 08:13:05 adam Exp $
+ * $Id: zoom-c.c,v 1.102 2006-12-06 21:35:58 adam Exp $
*/
/**
* \file zoom-c.c
*/
/**
* \file zoom-c.c
@@
-453,9
+453,6
@@
ZOOM_API(void)
else
c->lang = 0;
else
c->lang = 0;
- val = ZOOM_options_get(c->options, "sru");
- c->sru_mode = get_sru_mode_from_string(val);
-
xfree(c->host_port);
if (portnum)
{
xfree(c->host_port);
if (portnum)
{
@@
-497,6
+494,9
@@
ZOOM_API(void)
}
}
}
}
+ val = ZOOM_options_get(c->options, "sru");
+ c->sru_mode = get_sru_mode_from_string(val);
+
ZOOM_options_set(c->options, "host", c->host_port);
val = ZOOM_options_get(c->options, "cookie");
ZOOM_options_set(c->options, "host", c->host_port);
val = ZOOM_options_get(c->options, "cookie");
@@
-1276,7
+1276,7
@@
static zoom_ret ZOOM_connection_send_init(ZOOM_connection c)
odr_prepend(c->odr_out, "ZOOM-C",
ireq->implementationName));
odr_prepend(c->odr_out, "ZOOM-C",
ireq->implementationName));
- version = odr_strdup(c->odr_out, "$Revision: 1.99 $");
+ version = odr_strdup(c->odr_out, "$Revision: 1.102 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion =
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion =
@@
-3436,6
+3436,16
@@
static void interpret_otherinformation_field(ZOOM_connection c,
}
}
}
}
+
+static void set_init_option(const char *name, void *clientData) {
+ ZOOM_connection c = clientData;
+ char buf[80];
+
+ sprintf(buf, "init_opt_%.70s", name);
+ ZOOM_connection_option_set(c, buf, "1");
+}
+
+
static void recv_apdu(ZOOM_connection c, Z_APDU *apdu)
{
Z_InitResponse *initrs;
static void recv_apdu(ZOOM_connection c, Z_APDU *apdu)
{
Z_InitResponse *initrs;
@@
-3466,6
+3476,10
@@
static void recv_apdu(ZOOM_connection c, Z_APDU *apdu)
ZOOM_connection_option_set(c, "targetImplementationVersion",
initrs->implementationVersion ?
initrs->implementationVersion : "");
ZOOM_connection_option_set(c, "targetImplementationVersion",
initrs->implementationVersion ?
initrs->implementationVersion : "");
+
+ /* Make initrs->options available as ZOOM-level options */
+ yaz_init_opt_decode(initrs->options, set_init_option, (void*) c);
+
if (!*initrs->result)
{
Z_External *uif = initrs->userInformationField;
if (!*initrs->result)
{
Z_External *uif = initrs->userInformationField;
@@
-3674,8
+3688,7
@@
static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
Z_SOAP *soap_package = 0;
ODR o = c->odr_in;
Z_SOAP_Handler soap_handlers[2] = {
Z_SOAP *soap_package = 0;
ODR o = c->odr_in;
Z_SOAP_Handler soap_handlers[2] = {
- {"http://www.loc.gov/zing/srw/", 0,
- (Z_SOAP_fun) yaz_srw_codec},
+ {YAZ_XMLNS_SRU_v1_1, 0, (Z_SOAP_fun) yaz_srw_codec},
{0, 0, 0}
};
ret = z_soap_codec(o, &soap_package,
{0, 0, 0}
};
ret = z_soap_codec(o, &soap_package,