* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.cpp,v 1.77 2004-01-06 21:17:42 adam Exp $
+ * $Id: yaz-proxy.cpp,v 1.79 2004-01-07 11:37:45 adam Exp $
*/
#include <assert.h>
m_config = 0;
m_marcxml_flag = 0;
m_stylesheet = 0;
+ m_schema = 0;
m_initRequest_apdu = 0;
m_initRequest_mem = 0;
m_apdu_invalid_session = 0;
xfree (m_proxy_authentication);
xfree (m_optimize);
xfree (m_stylesheet);
+ xfree (m_schema);
if (m_s2z_odr_init)
odr_destroy(m_s2z_odr_init);
if (m_s2z_odr_search)
oident *ent = oid_getentbyoid(r->direct_reference);
if (r->which == Z_External_octet && ent->value == VAL_TEXT_XML)
{
- srw_res->records[i].recordSchema = "http://www.loc.gov/marcxml/";
+ srw_res->records[i].recordSchema = m_schema;
srw_res->records[i].recordPacking = m_s2z_packing;
srw_res->records[i].recordData_buf = (char*)
r->u.octet_aligned->buf;
int Yaz_ProxyClient::send_to_target(Z_APDU *apdu)
{
int len = 0;
+ const char *apdu_name_tmp = apdu_name(apdu);
int r = send_Z_PDU(apdu, &len);
if (m_root->get_log_mask() & PROXY_LOG_REQ_SERVER)
yaz_log (LOG_LOG, "%sSending %s to %s %d bytes",
get_session_str(),
- apdu_name(apdu), get_hostname(), len);
+ apdu_name_tmp, get_hostname(), len);
m_bytes_sent += len;
return r;
}
err = cfg->check_syntax(odr_encode(),
m_default_target,
sr->preferredRecordSyntax, rc,
- &addinfo, &m_stylesheet);
+ &addinfo, &m_stylesheet, &m_schema);
if (err == -1)
{
sr->preferredRecordSyntax =
err = cfg->check_syntax(odr_encode(), m_default_target,
pr->preferredRecordSyntax,
pr->recordComposition,
- &addinfo, &m_stylesheet);
+ &addinfo, &m_stylesheet, &m_schema);
if (err == -1)
{
pr->preferredRecordSyntax =