* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.113 2007-04-12 13:52:57 adam Exp $
+ * $Id: seshigh.c,v 1.117 2007-05-02 12:36:34 adam Exp $
*/
/**
* \file seshigh.c
assoc->init->implementation_version = 0;
assoc->init->implementation_id = 0;
assoc->init->implementation_name = 0;
+ assoc->init->query_charset = 0;
+ assoc->init->records_in_same_charset = 0;
assoc->init->bend_sort = NULL;
assoc->init->bend_search = NULL;
assoc->init->bend_present = NULL;
if (input_syntax_raw)
{
char oidbuf[OID_STR_MAX];
- oid_to_dotstring(input_syntax_raw, oidbuf);
+ oid_oid_to_dotstring(input_syntax_raw, oidbuf);
rr->errstring = odr_strdup(rr->stream, oidbuf);
}
return -1;
rr.setname = "default";
rr.number = pos;
rr.referenceId = 0;
- rr.request_format = yaz_string_to_oid_odr(yaz_oid_std(),
- CLASS_RECSYN,
- OID_STR_XML,
- assoc->decode);
+ rr.request_format = odr_oiddup(assoc->decode, yaz_oid_recsyn_xml);
+
rr.comp = (Z_RecordComposition *)
odr_malloc(assoc->decode, sizeof(*rr.comp));
rr.comp->which = Z_RecordComp_complex;
static char *get_vhost(Z_OtherInformation *otherInfo)
{
- const int *oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_USERINFO, OID_STR_PROXY);
- return yaz_oi_get_string_oid(&otherInfo, oid, 1, 0);
+ return yaz_oi_get_string_oid(&otherInfo, yaz_oid_userinfo_proxy, 1, 0);
}
/*
ODR_MASK_SET(resp->options, Z_Options_sort);
strcat(options, " sort");
}
-
- if (ODR_MASK_GET(req->options, Z_Options_negotiationModel)
- && assoc->init->charneg_response)
+
+ if (!assoc->init->charneg_response && !assoc->init->charneg_request)
+ {
+ if (assoc->init->query_charset)
+ {
+ assoc->init->charneg_response = yaz_set_response_charneg(
+ assoc->encode, assoc->init->query_charset, 0,
+ assoc->init->records_in_same_charset);
+ }
+ else
+ {
+ yaz_log(YLOG_WARN, "default query_charset not defined by backend");
+ }
+ }
+ if (assoc->init->charneg_response
+ && ODR_MASK_GET(req->options, Z_Options_negotiationModel))
{
Z_OtherInformation **p;
Z_OtherInformationUnit *p0;
ODR_MASK_SET(resp->options, Z_Options_negotiationModel);
strcat(options, " negotiation");
}
-
if (ODR_MASK_GET(req->options, Z_Options_triggerResourceCtrl))
ODR_MASK_SET(resp->options, Z_Options_triggerResourceCtrl);
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.113 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.117 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
/* Do something with the members of bend_extendedservice */
if (esrequest.taskPackage)
{
- const int *oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_EXTSERV, OID_STR_EXTENDED);
- resp->taskPackage = z_ext_record_oid(assoc->encode, oid,
- (const char *) esrequest.taskPackage,
- -1);
+ resp->taskPackage = z_ext_record_oid(
+ assoc->encode, yaz_oid_recsyn_extended,
+ (const char *) esrequest.taskPackage, -1
+ );
}
yaz_log(YLOG_DEBUG,"Send the result apdu");
return apdu;