From 39f918700e8e8ba2fcb1fbc3427ed2d2145fea5f Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 11 Mar 2011 22:28:23 +0000 Subject: Fix linking problem where binaries linked against the installed libs, not the dev ones Allow a null xpath, return a null value, don't crash Fix method setting in curlHelper Remove useless Views object in console appengine, there's one in the base, fixes views in console mode --- project2/Jamfile.jam | 4 +++- project2/console/consoleAppEngine.h | 2 -- project2/curlHelper.cpp | 2 +- project2/xslRows.cpp | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/project2/Jamfile.jam b/project2/Jamfile.jam index 0b8425e..575d4f9 100644 --- a/project2/Jamfile.jam +++ b/project2/Jamfile.jam @@ -26,7 +26,6 @@ lib curl : : curl ; lib osspuuid : : ossp-uuid++ ; alias p2parts : : : : - p2common p2url p2files p2processes @@ -181,6 +180,8 @@ lib p2web : p2xmlSession : : p2parts + p2xmlSession + p2uuid ; exe p2cgi : @@ -203,6 +204,7 @@ exe p2console : [ glob console/*.cpp ] : p2parts + p2common ../libmisc ; diff --git a/project2/console/consoleAppEngine.h b/project2/console/consoleAppEngine.h index b7b4f1d..93e76ed 100644 --- a/project2/console/consoleAppEngine.h +++ b/project2/console/consoleAppEngine.h @@ -48,8 +48,6 @@ class ConsoleApplicationEngine : public ApplicationEngine, public Presenter, Req typedef Storage::Objects ParamCheckers; ParamCheckers parameterChecks; - typedef Storage::Objects Views; - Views views; SessionPtr runtime; FileStreamVariableWriter out; }; diff --git a/project2/curlHelper.cpp b/project2/curlHelper.cpp index 742e4de..7c204aa 100644 --- a/project2/curlHelper.cpp +++ b/project2/curlHelper.cpp @@ -5,7 +5,7 @@ CurlHelper::CurlHelper(const xmlpp::Element * p) : userAgent(p, "useragent", false, "project2/0.3"), cookieJar(p, "cookiejar", false), proxy(p, "proxy", false), - method(p, "username", false), + method(p, "method", false), userName(p, "username", false), password(p, "password", false), timeout(p, "timeout", false, Variable(6000)) diff --git a/project2/xslRows.cpp b/project2/xslRows.cpp index 9793119..82c9d4a 100644 --- a/project2/xslRows.cpp +++ b/project2/xslRows.cpp @@ -116,6 +116,10 @@ XslRows::execute(const RowProcessor * rp) const xpathCtx->node = rowRoot; values.clear(); BOOST_FOREACH(const FilterView::XPaths::value_type & xp, fv->xpaths) { + if (boost::get(&xp.second())) { + values[xp.first] = Null(); + continue; + } xmlXPathObjectSPtr xpathObjI = xmlXPathObjectSPtr(xmlXPathEvalExpression(xp.second(), xpathCtx.get()), xmlXPathFreeObject); if (!xpathObjI) { throw XpathEvalError(xmlGetLastError()->message); -- cgit v1.2.3