/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
/**
if ((assoc->cs_put_mask & EVENT_INPUT) == 0 && (event & assoc->cs_get_mask))
{
- yaz_log(YLOG_DEBUG, "ir_session (input)");
/* We aren't speaking to this fellow */
if (assoc->state == ASSOC_DEAD)
{
- yaz_log(log_sessiondetail, "Connection closed - end of session");
+ yaz_log(log_session, "Connection closed - end of session");
cs_close(conn);
destroy_association(assoc);
iochan_destroy(h);
}
else if (res <= 0)
{
- yaz_log(log_session, "Connection closed by client");
assoc->state = ASSOC_DEAD;
+ yaz_log(log_session, "Connection closed by client");
return 0;
}
else if (res == 1) /* incomplete read - wait for more */
yaz_log(YLOG_DEBUG, "HTTP out:\n%.*s", req->len_response,
req->response);
#endif
- nmem_destroy(req->request_mem);
request_deq(&assoc->outgoing);
request_release(req);
if (!request_head(&assoc->outgoing))
int r;
int srw_errcode = 0;
const char *add = 0;
- char rpn_buf[5120];
+ WRBUF rpn_buf = wrbuf_alloc();
*sortkeys_p = 0;
r = cql_parser_string(cp, cql);
struct cql_node *cn = cql_parser_result(cp);
/* Syntax OK */
- r = cql_transform_buf(ct, cn, rpn_buf, sizeof(rpn_buf)-1);
+ r = cql_transform(ct, cn, wrbuf_vp_puts, rpn_buf);
if (r)
srw_errcode = cql_transform_error(ct, &add);
else
if (r == 0)
{
if (*out)
- yaz_log (log_requestdetail, "srw_sortKeys '%s'", out);
+ yaz_log(log_requestdetail, "srw_sortKeys '%s'", out);
*sortkeys_p = odr_strdup(odr, out);
}
else
/* Syntax & transform OK. */
/* Convert PQF string to Z39.50 to RPN query struct */
YAZ_PQF_Parser pp = yaz_pqf_create();
- Z_RPNQuery *rpnquery = yaz_pqf_parse(pp, odr, rpn_buf);
+ Z_RPNQuery *rpnquery = yaz_pqf_parse(pp, odr, wrbuf_cstr(rpn_buf));
if (!rpnquery)
{
size_t off;
yaz_pqf_destroy(pp);
}
cql_parser_destroy(cp);
+ wrbuf_destroy(rpn_buf);
return srw_errcode;
}
{0, 0, 0}
};
char ctype[80];
- int ret;
p = z_get_HTTP_Response(o, 200);
hres = p->u.HTTP_Response;
if (stylesheet && *stylesheet == '\0')
stylesheet = 0;
- ret = z_soap_codec_enc_xsl(assoc->encode, &soap_package,
- &hres->content_buf, &hres->content_len,
- soap_handlers, charset, stylesheet);
+ z_soap_codec_enc_xsl(assoc->encode, &soap_package,
+ &hres->content_buf, &hres->content_len,
+ soap_handlers, charset, stylesheet);
hres->code = http_code;
strcpy(ctype, "text/xml");
bsrr->extra_args = 0;
bsrr->extra_response_data = 0;
- yaz_log (log_requestdetail, "ResultSet '%s'", req->resultSetName);
+ yaz_log(log_requestdetail, "ResultSet '%s'", req->resultSetName);
if (req->databaseNames)
{
int i;
Odr_int *next;
Odr_int *num;
int errcode = 0;
- const char *errstring = 0;
yaz_log(log_requestdetail, "Got PresentRequest.");
resp->records = diagrec(assoc, bprr->errcode, bprr->errstring);
*resp->presentStatus = Z_PresentStatus_failure;
errcode = bprr->errcode;
- errstring = bprr->errstring;
}
}
apdu = (Z_APDU *)odr_malloc(assoc->encode, sizeof(*apdu));