summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/components/queue
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-05-28 04:39:18 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-05-28 04:39:18 +0000
commitf278315081b24b59bf73e9613e552e3519200a71 (patch)
treecdfe0e8d00e2c3e8002284c4541429f91cb66e68 /sca-cpp/trunk/components/queue
parentc3eb9d1e20e1f8a7a101854d6a883692cac4e8d0 (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/queue')
-rwxr-xr-xsca-cpp/trunk/components/queue/qpidd-stop6
-rw-r--r--sca-cpp/trunk/components/queue/queue-listener.cpp2
-rw-r--r--sca-cpp/trunk/components/queue/queue-sender.cpp2
-rwxr-xr-xsca-cpp/trunk/components/queue/server-test1
4 files changed, 8 insertions, 3 deletions
diff --git a/sca-cpp/trunk/components/queue/qpidd-stop b/sca-cpp/trunk/components/queue/qpidd-stop
index bb43d8aaba..c8af680d78 100755
--- a/sca-cpp/trunk/components/queue/qpidd-stop
+++ b/sca-cpp/trunk/components/queue/qpidd-stop
@@ -23,4 +23,8 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h
qpid_prefix=`cat $here/qpidc.prefix`
qpidd="$qpid_prefix/sbin/qpidd"
-kill `ps -ef | grep -v grep | grep "${qpidd}" | awk '{ print $2 }'`
+k=`ps -ef | grep -v grep | grep "${qpidd}" | awk '{ print $2 }'`
+if [ "$k" != "" ]; then
+ kill $k
+fi
+
diff --git a/sca-cpp/trunk/components/queue/queue-listener.cpp b/sca-cpp/trunk/components/queue/queue-listener.cpp
index 8d253a670d..3c30e7feca 100644
--- a/sca-cpp/trunk/components/queue/queue-listener.cpp
+++ b/sca-cpp/trunk/components/queue/queue-listener.cpp
@@ -97,7 +97,7 @@ public:
// Stop the component
if (func != "stop")
- return tuscany::mkfailure<tuscany::value>();
+ return mkfailure<value>();
debug("queue::listener::stop");
// TODO check why stop() and close() hang in child processes
diff --git a/sca-cpp/trunk/components/queue/queue-sender.cpp b/sca-cpp/trunk/components/queue/queue-sender.cpp
index ea6e45d988..ff2ede1057 100644
--- a/sca-cpp/trunk/components/queue/queue-sender.cpp
+++ b/sca-cpp/trunk/components/queue/queue-sender.cpp
@@ -54,7 +54,7 @@ const failable<value> post(const list<value>& params) {
debug(cadr(params), "queue::post::value");
const failable<bool> r = post(key, cadr(params), qs);
if (!hasContent(r))
- return mkfailure<value>(reason(r));
+ return mkfailure<value>(r);
return key;
}
diff --git a/sca-cpp/trunk/components/queue/server-test b/sca-cpp/trunk/components/queue/server-test
index 6b572fce6f..269d3f9376 100755
--- a/sca-cpp/trunk/components/queue/server-test
+++ b/sca-cpp/trunk/components/queue/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-event-conf tmp
../../modules/server/server-conf tmp