char *r;
WRBUF wrb = wrbuf_alloc();
int status;
+ ODR odr_out = odr_createmem(ODR_ENCODE);
- zquery = p_query_rpn(global_parameters.odr_out, cl->pquery);
+ zquery = p_query_rpn(odr_out, cl->pquery);
if ((status = cql_transform_rpn2cql_wrbuf(cqlt, wrb, zquery)))
{
yaz_log(YLOG_WARN, "failed to generate CQL query, code=%d", status);
- return 0;
+ r = 0;
}
- r = xstrdup(wrbuf_cstr(wrb));
-
+ else
+ {
+ r = xstrdup(wrbuf_cstr(wrb));
+ }
wrbuf_destroy(wrb);
- odr_reset(global_parameters.odr_out); // releases the zquery
+ odr_destroy(odr_out);
cql_transform_close(cqlt);
return r;
}
assert(con);
ZOOM_options_set(zoptions, "async", "1");
- ZOOM_options_set(zoptions, "implementationName",
- global_parameters.implementationName);
- ZOOM_options_set(zoptions, "implementationVersion",
- global_parameters.implementationVersion);
+ ZOOM_options_set(zoptions, "implementationName", PACKAGE_NAME);
+ ZOOM_options_set(zoptions, "implementationVersion", VERSION);
if (zproxy && *zproxy)
{
con->zproxy = xstrdup(zproxy);
0, // dump_records
0, // debug_mode
30, // operations timeout
- "81",
- "Index Data PazPar2",
- VERSION,
60, // session timeout
100,
MAX_CHUNK,
- 0,
- 0,
180, // Z39.50 session timeout
15 // Connect timeout
};
int dump_records;
int debug_mode;
int timeout; /* operations timeout, in seconds */
- char implementationId[128];
- char implementationName[128];
- char implementationVersion[128];
int session_timeout;
int toget;
int chunk;
- ODR odr_out;
- ODR odr_in;
int z3950_session_timeout;
int z3950_connect_timeout;
};
struct conf_config *config = (struct conf_config *) data;
config_read_settings(config, path_override);
- global_parameters.odr_in = odr_createmem(ODR_DECODE);
- global_parameters.odr_out = odr_createmem(ODR_ENCODE);
-
pazpar2_event_loop();
}