X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fseshigh.c;h=079a30db96e686fef399091209eef747e048c1de;hb=52ef22373a88e2cc18e515610a40b3cb4e0b7549;hp=9227158b321d035dfcde57c870966937f8b36359;hpb=2346d7d4a9084a41800893d212610af66250e536;p=yaz-moved-to-github.git diff --git a/src/seshigh.c b/src/seshigh.c index 9227158..079a30d 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * 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.99 2006-09-27 11:39:02 adam Exp $ */ /** * \file seshigh.c @@ -108,7 +108,7 @@ static int log_request = 0; /* one-line logs for requests */ static int log_requestdetail = 0; /* more detailed stuff */ /** get_logbits sets global loglevel bits */ -static void get_logbits() +static void get_logbits(void) { /* needs to be called after parsing cmd-line args that can set loglevels!*/ if (!logbits_set) { @@ -519,9 +519,6 @@ static int srw_bend_init(association *assoc, Z_SRW_diagnostic **d, int *num, Z_S 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)); @@ -2308,13 +2305,12 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) } 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; @@ -2327,7 +2323,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) 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.99 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode,