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
Fix compilation for mingw.
[yaz-moved-to-github.git]
/
src
/
seshigh.c
diff --git
a/src/seshigh.c
b/src/seshigh.c
index
9edcb2e
..
8c0c3fa
100644
(file)
--- a/
src/seshigh.c
+++ b/
src/seshigh.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data
+ * Copyright (C) 1995-2009 Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-509,6
+509,7
@@
static void assoc_init_reset(association *assoc)
assoc->init->bend_explain = NULL;
assoc->init->bend_srw_scan = NULL;
assoc->init->bend_srw_update = NULL;
assoc->init->bend_explain = NULL;
assoc->init->bend_srw_scan = NULL;
assoc->init->bend_srw_update = NULL;
+ assoc->init->named_result_sets = 0;
assoc->init->charneg_request = NULL;
assoc->init->charneg_response = NULL;
assoc->init->charneg_request = NULL;
assoc->init->charneg_response = NULL;
@@
-664,7
+665,6
@@
static int retrieve_fetch(association *assoc, bend_fetch_rr *rr)
rr->output_format = match_syntax;
if (match_schema)
rr->schema = odr_strdup(rr->stream, match_schema);
rr->output_format = match_syntax;
if (match_schema)
rr->schema = odr_strdup(rr->stream, match_schema);
- return 0;
#else
(*assoc->init->bend_fetch)(assoc->backend, rr);
#endif
#else
(*assoc->init->bend_fetch)(assoc->backend, rr);
#endif
@@
-1710,7
+1710,7
@@
static void process_http_request(association *assoc, request *req)
}
else
{
}
else
{
- int content_size = 0;
+ size_t content_size = 0;
char *content_buf = read_file(hreq->path+1, o, &content_size);
if (!content_buf)
{
char *content_buf = read_file(hreq->path+1, o, &content_size);
if (!content_buf)
{
@@
-2198,6
+2198,10
@@
static Z_APDU *process_initRequest(association *assoc, request *reqb)
assoc->init->charneg_request = negotiation;
}
assoc->init->charneg_request = negotiation;
}
+ /* by default named_result_sets is 0 .. Enable it if client asks for it. */
+ if (ODR_MASK_GET(req->options, Z_Options_namedResultSets))
+ assoc->init->named_result_sets = 1;
+
assoc->backend = 0;
if (cb)
{
assoc->backend = 0;
if (cb)
{
@@
-2264,7
+2268,8
@@
static Z_APDU *process_initRequest(association *assoc, request *reqb)
ODR_MASK_SET(resp->options, Z_Options_extendedServices);
strcat(options, " extendedServices");
}
ODR_MASK_SET(resp->options, Z_Options_extendedServices);
strcat(options, " extendedServices");
}
- if (ODR_MASK_GET(req->options, Z_Options_namedResultSets))
+ if (ODR_MASK_GET(req->options, Z_Options_namedResultSets)
+ && assoc->init->named_result_sets)
{
ODR_MASK_SET(resp->options, Z_Options_namedResultSets);
strcat(options, " namedresults");
{
ODR_MASK_SET(resp->options, Z_Options_namedResultSets);
strcat(options, " namedresults");
@@
-3524,6
+3529,7
@@
int bend_assoc_is_alive(bend_association assoc)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab