diff options
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/components/cache/mcache.cpp | 11 | ||||
-rwxr-xr-x | sca-cpp/trunk/components/cache/memcached-server-test | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sca-cpp/trunk/components/cache/mcache.cpp b/sca-cpp/trunk/components/cache/mcache.cpp index b60301bbf2..926fb66674 100644 --- a/sca-cpp/trunk/components/cache/mcache.cpp +++ b/sca-cpp/trunk/components/cache/mcache.cpp @@ -89,15 +89,16 @@ const failable<value, std::string> del(const list<value>& params) { extern "C" { -const tuscany::failable<tuscany::value, std::string> eval(const tuscany::value& func, const tuscany::list<tuscany::value>& params) { +const tuscany::value eval(const tuscany::list<tuscany::value>& params) { + const tuscany::value func(car(params)); if (func == "get") - return tuscany::cache::get(params); + return tuscany::cache::get(cdr(params)); if (func == "post") - return tuscany::cache::post(params); + return tuscany::cache::post(cdr(params)); if (func == "put") - return tuscany::cache::put(params); + return tuscany::cache::put(cdr(params)); if (func == "delete") - return tuscany::cache::del(params); + return tuscany::cache::del(cdr(params)); return tuscany::mkfailure<tuscany::value, std::string>(std::string("Function not supported: ") + std::string(func)); } diff --git a/sca-cpp/trunk/components/cache/memcached-server-test b/sca-cpp/trunk/components/cache/memcached-server-test index 7cd01fe6f5..0dc32f6613 100755 --- a/sca-cpp/trunk/components/cache/memcached-server-test +++ b/sca-cpp/trunk/components/cache/memcached-server-test @@ -22,11 +22,9 @@ ../../modules/server/server-conf tmp cat >>tmp/conf/httpd.conf <<EOF -<Location /mcache> -SetHandler mod_tuscany_eval +<Location /> SCAContribution `pwd`/ SCAComposite mcache.composite -SCAComponent mcache </Location> EOF @@ -34,7 +32,7 @@ apachectl -k start -d `pwd`/tmp mc="memcached -l 127.0.0.1 -m 4 -p 11211" $mc & -sleep 1 +sleep 2 # Test ./mcache-client-test 2>/dev/null @@ -43,5 +41,5 @@ rc=$? # Cleanup kill `ps -f | grep -v grep | grep "$mc" | awk '{ print $2 }'` apachectl -k stop -d `pwd`/tmp -sleep 1 +sleep 2 return $rc |