X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftorus.cpp;h=54008503652adabb28439d04dca85c377f3cab25;hb=586d78659d671683f33ec55f4a7d32b28e345ccd;hp=828e4ac02efc92658dde21311a830d81ebffe3ac;hpb=8ced8e7b5de3ecba12ac68ce5c5e8cddf40d800f;p=metaproxy-moved-to-github.git diff --git a/src/torus.cpp b/src/torus.cpp index 828e4ac..5400850 100644 --- a/src/torus.cpp +++ b/src/torus.cpp @@ -1,5 +1,5 @@ /* 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 @@ -31,7 +31,8 @@ xmlDoc *mp::get_searchable(mp::Package &package, std::string url_template, const std::string &db, const std::string &query, const std::string &realm, - const std::string &proxy) + const std::string &proxy, + std::string &addinfo) { // http://mk2.indexdata.com/torus2/searchable/records/?query=udb%3d%db // or @@ -76,19 +77,28 @@ xmlDoc *mp::get_searchable(mp::Package &package, package.log("zoom", YLOG_LOG, "Torus: %s OK", url_template.c_str()); else + { package.log("zoom", YLOG_WARN, "Torus: %s FAIL. XML parse failed", url_template.c_str()); + addinfo = "Torus: XML parse failed"; + } } else { + addinfo = "Torus: "; if (http_response) { package.log("zoom", YLOG_WARN, "Torus: %s FAIL. HTTP code %d", url_template.c_str(), http_response->code); + addinfo += std::string(http_response->content_buf, + http_response->content_len); } else + { + addinfo += "unknown error"; package.log("zoom", YLOG_WARN, "Torus: %s FAIL. No HTTP response", url_template.c_str()); + } } if (http_response && http_response->content_buf)