projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ref to freed memory in log filter 1line - MP-556
[metaproxy-moved-to-github.git]
/
src
/
sru_util.cpp
diff --git
a/src/sru_util.cpp
b/src/sru_util.cpp
index
da9aaa4
..
d9e8730
100644
(file)
--- a/
src/sru_util.cpp
+++ b/
src/sru_util.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
+ Copyright (C) Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-131,6
+131,7
@@
bool mp_util::build_sru_explain(metaproxy_1::Package &package,
xmlDocDumpFormatMemory(doc, &xmlbuff, &xmlbuffsz, 1);
explain_xml.assign((const char*)xmlbuff, 0, xmlbuffsz);
xmlDocDumpFormatMemory(doc, &xmlbuff, &xmlbuffsz, 1);
explain_xml.assign((const char*)xmlbuff, 0, xmlbuffsz);
+ xmlFree(xmlbuff);
}
}
@@
-227,10
+228,10
@@
bool mp_util::build_sru_response(mp::Package &package,
Z_SRW_PDU * mp_util::decode_sru_request(mp::Package &package,
mp::odr &odr_de,
mp::odr &odr_en,
Z_SRW_PDU * mp_util::decode_sru_request(mp::Package &package,
mp::odr &odr_de,
mp::odr &odr_en,
- Z_SRW_PDU *sru_pdu_res,
+ Z_SRW_diagnostic **diagnostic,
+ int *num_diagnostic,
Z_SOAP **soap,
Z_SOAP **soap,
- char *charset,
- char *stylesheet)
+ char *charset)
{
Z_GDU *zgdu_req = package.request().get();
Z_SRW_PDU *sru_pdu_req = 0;
{
Z_GDU *zgdu_req = package.request().get();
Z_SRW_PDU *sru_pdu_req = 0;
@@
-251,15
+252,8
@@
Z_SRW_PDU * mp_util::decode_sru_request(mp::Package &package,
// closing connection if we did not ...
if (0 == yaz_sru_decode(http_req, &sru_pdu_req, soap,
odr_de, &charset,
// closing connection if we did not ...
if (0 == yaz_sru_decode(http_req, &sru_pdu_req, soap,
odr_de, &charset,
- &(sru_pdu_res->u.response->diagnostics),
- &(sru_pdu_res->u.response->num_diagnostics)))
+ diagnostic, num_diagnostic))
{
{
- if (sru_pdu_res->u.response->num_diagnostics)
- {
- //sru_pdu_res = sru_pdu_res_exp;
- package.session().close();
- return 0;
- }
return sru_pdu_req;
}
else if (0 == yaz_srw_decode(http_req, &sru_pdu_req, soap,
return sru_pdu_req;
}
else if (0 == yaz_srw_decode(http_req, &sru_pdu_req, soap,