diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-05-28 04:39:18 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-05-28 04:39:18 +0000 |
commit | f278315081b24b59bf73e9613e552e3519200a71 (patch) | |
tree | cdfe0e8d00e2c3e8002284c4541429f91cb66e68 /sca-cpp/trunk/components/smtp | |
parent | c3eb9d1e20e1f8a7a101854d6a883692cac4e8d0 (diff) |
Improve error reporting with a reason code. Improve debug and audit logging. Fix test scripts to cleanup state from previous builds and correctly report test errors.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1343138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/components/smtp')
-rwxr-xr-x | sca-cpp/trunk/components/smtp/server-test | 1 | ||||
-rw-r--r-- | sca-cpp/trunk/components/smtp/smtppost.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sca-cpp/trunk/components/smtp/server-test b/sca-cpp/trunk/components/smtp/server-test index 55464edc89..c111021c85 100755 --- a/sca-cpp/trunk/components/smtp/server-test +++ b/sca-cpp/trunk/components/smtp/server-test @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp ../../modules/http/httpd-conf tmp localhost 8090 ../../modules/http/htdocs ../../modules/http/httpd-loglevel-conf tmp debug ../../modules/server/server-conf tmp diff --git a/sca-cpp/trunk/components/smtp/smtppost.cpp b/sca-cpp/trunk/components/smtp/smtppost.cpp index a3eae095ef..db2ac9ef18 100644 --- a/sca-cpp/trunk/components/smtp/smtppost.cpp +++ b/sca-cpp/trunk/components/smtp/smtppost.cpp @@ -42,14 +42,14 @@ const failable<value> post(const string& url, const string& user, const string& // Convert value to a content request const failable<list<list<string> > > freq = http::contentRequest(val, url); if (!hasContent(freq)) - return mkfailure<value>(reason(freq)); + return mkfailure<value>(freq); const list<list<string> > req = content(freq); debug(req, "smtp::post::input"); // Setup the CURL session const failable<CURL*> fch = http::setup(url, cs); if (!hasContent(fch)) - return mkfailure<value>(reason(fch)); + return mkfailure<value>(fch); CURL* ch = content(fch); curl_easy_setopt(ch, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL); @@ -129,7 +129,7 @@ public: const value func(car(params)); if (func == "get") return get(url, user, pass, from, to, subject, val, *ch); - return tuscany::mkfailure<tuscany::value>(); + return mkfailure<value>(); } private: |