size of incoming packages (SRU + Z39.50). The value until was previously
only used in Z39.50 Init negotiation and, later, in a session controlled
sizes of records returned. This is controlled using -k option. It can be
specified, per server, with element maximumrecordsize in YAZ' GFS XML config.
+For the generic frontend server, the maximum record size is used as maximum
+size of incoming packages (SRU + Z39.50). The value until was previously
+only used in Z39.50 Init negotiation and, later, in a session controlled
+sizes of records returned. This is controlled using -k option. It can be
+specified, per server, with element maximumrecordsize in YAZ' GFS XML config.
+
--- 2.1.28 2006/09/04
TCP/IP comstack uses getaddrinfo now to resolve names. It should be IPV6
--- 2.1.28 2006/09/04
TCP/IP comstack uses getaddrinfo now to resolve names. It should be IPV6
- $Id: gfs-virtual.xml,v 1.6 2006-04-25 11:25:08 marc Exp $
+ $Id: gfs-virtual.xml,v 1.7 2006-09-06 09:35:39 adam Exp $
Description of the virtual host mechanism in YAZ GFS
Included in both manual and man page for yaz-ztest
-->
Description of the virtual host mechanism in YAZ GFS
Included in both manual and man page for yaz-ztest
-->
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
+
+ <varlistentry><term>element <literal>maximumrecordsize</literal> (optional)</term>
+ <listitem>
+ <para>
+ Specifies maximum record size/message size, in bytes. This
+ value also servers as maximum size of <emphasis>incoming</emphasis>
+ packages (for Record Updates etc). It's the same value as that
+ given by the <literal>-k</literal> option.
+ </para>
+ </listitem>
+ </varlistentry>
+
-<!-- $Id: yazgfs.xml,v 1.5 2006-05-09 13:39:46 adam Exp $ -->
+<!-- $Id: yazgfs.xml,v 1.6 2006-09-06 09:35:40 adam Exp $ -->
<!-- sample YAZ GFS config file .. see
http://indexdata.dk/yaz/doc/server.vhosts.tkl -->
<yazgfs>
<!-- sample YAZ GFS config file .. see
http://indexdata.dk/yaz/doc/server.vhosts.tkl -->
<yazgfs>
<cql2rpn>pqf.properties</cql2rpn>
<docpath>xsl</docpath>
<stylesheet>xsl/default.xsl</stylesheet>
<cql2rpn>pqf.properties</cql2rpn>
<docpath>xsl</docpath>
<stylesheet>xsl/default.xsl</stylesheet>
+ <maximumrecordsize>2000000</maximumrecordsize>
<retrievalinfo>
<retrieval syntax="grs-1"/>
<retrieval syntax="usmarc" name="F"/>
<retrievalinfo>
<retrieval syntax="grs-1"/>
<retrieval syntax="usmarc" name="F"/>
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.97 2006-09-01 12:40:44 adam Exp $
+ * $Id: seshigh.c,v 1.98 2006-09-06 09:35:41 adam Exp $
yaz_log(log_requestdetail, "srw_bend_init config=%s", cb->configname);
assoc_init_reset(assoc);
yaz_log(log_requestdetail, "srw_bend_init config=%s", cb->configname);
assoc_init_reset(assoc);
- assoc->maximumRecordSize = 3000000;
- assoc->preferredMessageSize = 3000000;
-
if (sr->username)
{
Z_IdAuthentication *auth = odr_malloc(assoc->decode, sizeof(*auth));
if (sr->username)
{
Z_IdAuthentication *auth = odr_malloc(assoc->decode, sizeof(*auth));
}
yaz_log(log_requestdetail, "Negotiated to v%d: %s", assoc->version, options);
}
yaz_log(log_requestdetail, "Negotiated to v%d: %s", assoc->version, options);
- assoc->maximumRecordSize = *req->maximumRecordSize;
- if (cb && assoc->maximumRecordSize > cb->maxrecordsize)
- assoc->maximumRecordSize = cb->maxrecordsize;
- assoc->preferredMessageSize = *req->preferredMessageSize;
- if (assoc->preferredMessageSize > assoc->maximumRecordSize)
- assoc->preferredMessageSize = assoc->maximumRecordSize;
+ if (*req->maximumRecordSize < assoc->maximumRecordSize)
+ assoc->maximumRecordSize = *req->maximumRecordSize;
+
+ if (*req->preferredMessageSize < assoc->preferredMessageSize)
+ assoc->preferredMessageSize = *req->preferredMessageSize;
resp->preferredMessageSize = &assoc->preferredMessageSize;
resp->maximumRecordSize = &assoc->maximumRecordSize;
resp->preferredMessageSize = &assoc->preferredMessageSize;
resp->maximumRecordSize = &assoc->maximumRecordSize;
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.97 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.98 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
* NT threaded server code by
* Chas Woodfield, Fretwell Downing Informatics.
*
* NT threaded server code by
* Chas Woodfield, Fretwell Downing Informatics.
*
- * $Id: statserv.c,v 1.40 2006-07-07 13:02:21 marc Exp $
+ * $Id: statserv.c,v 1.41 2006-09-06 09:35:42 adam Exp $
assoc->server = gfs;
assoc->last_control = &gfs->cb;
statserv_setcontrol(&gfs->cb);
assoc->server = gfs;
assoc->last_control = &gfs->cb;
statserv_setcontrol(&gfs->cb);
- yaz_log(YLOG_DEBUG, "server select: %s", gfs->cb.configname);
- return 1;
- statserv_setcontrol(0);
- assoc->last_control = 0;
- yaz_log(YLOG_DEBUG, "server select: no match");
- return 0;
+ if (!gfs)
+ {
+ statserv_setcontrol(0);
+ assoc->last_control = 0;
+ return 0;
+ }
}
else
{
statserv_setcontrol(&control_block);
assoc->last_control = &control_block;
}
else
{
statserv_setcontrol(&control_block);
assoc->last_control = &control_block;
- yaz_log(YLOG_DEBUG, "server select: config=%s", control_block.configname);
- return 1;
+ yaz_log(YLOG_DEBUG, "server select: config=%s",
+ assoc->last_control->configname);
+
+ assoc->maximumRecordSize = assoc->last_control->maxrecordsize;
+ assoc->preferredMessageSize = assoc->last_control->maxrecordsize;
+ cs_set_max_recv_bytes(assoc->client_link, assoc->maximumRecordSize);
+ return 1;
}
static void xml_config_read()
}
static void xml_config_read()
xmlNodePtr ptr;
const char *listenref = 0;
const char *id = 0;
xmlNodePtr ptr;
const char *listenref = 0;
const char *id = 0;
+ struct gfs_server *gfs;
for ( ; attr; attr = attr->next)
if (!xmlStrcmp(attr->name, BAD_CAST "listenref")
for ( ; attr; attr = attr->next)
if (!xmlStrcmp(attr->name, BAD_CAST "listenref")
else
yaz_log(YLOG_WARN, "Unknown attribute '%s' for server",
attr->name);
else
yaz_log(YLOG_WARN, "Unknown attribute '%s' for server",
attr->name);
- *gfsp = gfs_server_new();
- (*gfsp)->server_node_ptr = ptr_server;
+ gfs = *gfsp = gfs_server_new();
+ gfs->server_node_ptr = ptr_server;
if (listenref)
{
int id_no;
if (listenref)
{
int id_no;
for (id_no = 1; gl; gl = gl->next, id_no++)
if (gl->id && !strcmp(gl->id, listenref))
{
for (id_no = 1; gl; gl = gl->next, id_no++)
if (gl->id && !strcmp(gl->id, listenref))
{
- (*gfsp)->listen_ref = id_no;
+ gfs->listen_ref = id_no;
continue;
if (!strcmp((const char *) ptr->name, "host"))
{
continue;
if (!strcmp((const char *) ptr->name, "host"))
{
- (*gfsp)->host = nmem_dup_xml_content(gfs_nmem,
+ gfs->host = nmem_dup_xml_content(gfs_nmem,
ptr->children);
}
else if (!strcmp((const char *) ptr->name, "config"))
{
ptr->children);
}
else if (!strcmp((const char *) ptr->name, "config"))
{
- strcpy((*gfsp)->cb.configname,
+ strcpy(gfs->cb.configname,
nmem_dup_xml_content(gfs_nmem, ptr->children));
}
else if (!strcmp((const char *) ptr->name, "cql2rpn"))
{
nmem_dup_xml_content(gfs_nmem, ptr->children));
}
else if (!strcmp((const char *) ptr->name, "cql2rpn"))
{
- (*gfsp)->cql_transform = cql_transform_open_fname(
+ gfs->cql_transform = cql_transform_open_fname(
nmem_dup_xml_content(gfs_nmem, ptr->children)
);
}
else if (!strcmp((const char *) ptr->name, "directory"))
{
nmem_dup_xml_content(gfs_nmem, ptr->children)
);
}
else if (!strcmp((const char *) ptr->name, "directory"))
{
nmem_dup_xml_content(gfs_nmem, ptr->children);
}
else if (!strcmp((const char *) ptr->name, "docpath"))
{
nmem_dup_xml_content(gfs_nmem, ptr->children);
}
else if (!strcmp((const char *) ptr->name, "docpath"))
{
nmem_dup_xml_content(gfs_nmem, ptr->children);
}
nmem_dup_xml_content(gfs_nmem, ptr->children);
}
+ else if (!strcmp((const char *) ptr->name, "maximumrecordsize"))
+ {
+ gfs->cb.maxrecordsize = atoi(
+ nmem_dup_xml_content(gfs_nmem, ptr->children));
+ }
else if (!strcmp((const char *) ptr->name, "stylesheet"))
{
char *s = nmem_dup_xml_content(gfs_nmem, ptr->children);
else if (!strcmp((const char *) ptr->name, "stylesheet"))
{
char *s = nmem_dup_xml_content(gfs_nmem, ptr->children);
nmem_malloc(gfs_nmem, strlen(s) + 2);
nmem_malloc(gfs_nmem, strlen(s) + 2);
- sprintf((*gfsp)->stylesheet, "/%s", s);
+ sprintf(gfs->stylesheet, "/%s", s);
}
else if (!strcmp((const char *) ptr->name, "explain"))
{
}
else if (!strcmp((const char *) ptr->name, "explain"))
{
}
else if (!strcmp((const char *) ptr->name, "retrievalinfo"))
{
}
else if (!strcmp((const char *) ptr->name, "retrievalinfo"))
{
- if (yaz_retrieval_configure((*gfsp)->retrieval, ptr))
+ if (yaz_retrieval_configure(gfs->retrieval, ptr))
{
yaz_log(YLOG_FATAL, "%s in config %s",
{
yaz_log(YLOG_FATAL, "%s in config %s",
- yaz_retrieval_get_error((*gfsp)->retrieval),
+ yaz_retrieval_get_error(gfs->retrieval),
control_block.xml_config);
exit(1);
}
control_block.xml_config);
exit(1);
}