Return-Path: X-Original-To: apmail-tuscany-commits-archive@www.apache.org Delivered-To: apmail-tuscany-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 762D77533 for ; Wed, 21 Dec 2011 18:32:20 +0000 (UTC) Received: (qmail 59399 invoked by uid 500); 21 Dec 2011 18:32:20 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 59347 invoked by uid 500); 21 Dec 2011 18:32:20 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 59340 invoked by uid 99); 21 Dec 2011 18:32:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 18:32:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 18:32:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5AC6823888FD for ; Wed, 21 Dec 2011 18:31:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1221832 - in /tuscany/sca-cpp/trunk/modules: scdl/scdl.hpp server/mod-eval.hpp server/mod-wiring.cpp Date: Wed, 21 Dec 2011 18:31:56 -0000 To: commits@tuscany.apache.org From: jsdelfino@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111221183156.5AC6823888FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Wed Dec 21 18:31:55 2011 New Revision: 1221832 URL: http://svn.apache.org/viewvc?rev=1221832&view=rev Log: Fix calculation of composite path when configured with an absolute path. Modified: tuscany/sca-cpp/trunk/modules/scdl/scdl.hpp tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp Modified: tuscany/sca-cpp/trunk/modules/scdl/scdl.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scdl/scdl.hpp?rev=1221832&r1=1221831&r2=1221832&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/scdl/scdl.hpp (original) +++ tuscany/sca-cpp/trunk/modules/scdl/scdl.hpp Wed Dec 21 18:31:55 2011 @@ -208,6 +208,13 @@ const value propertyValue(const value& l return elementValue(l); } +/** + * Returns the absolute path of a resource in a contribution. + */ +const string resourcePath(const string& contrib, const string& path) { + return c_str(path)[0] == '/'? path : contrib + path; +} + } } Modified: tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp?rev=1221832&r1=1221831&r2=1221832&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp (original) +++ tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp Wed Dec 21 18:31:55 2011 @@ -741,7 +741,7 @@ const failable confComponents(Serv if (sc.key != "") debug(sc.key, "modeval::confComponents::sslKey"); // Read the components and get their implementation lambda functions - const failable > comps = readComponents(sc.contributionPath + sc.compositeName); + const failable > comps = readComponents(scdl::resourcePath(sc.contributionPath, sc.compositeName)); if (!hasContent(comps)) return mkfailure(reason(comps)); sc.implementations = componentToImplementationAssoc(sc, content(comps)); Modified: tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp?rev=1221832&r1=1221831&r2=1221832&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp (original) +++ tuscany/sca-cpp/trunk/modules/server/mod-wiring.cpp Wed Dec 21 18:31:55 2011 @@ -265,7 +265,7 @@ const bool confComponents(ServerConf& sc // Read the component configuration and store the references and service URIs // in trees for fast retrieval later - const failable > comps = readComponents(sc.contributionPath + sc.compositeName); + const failable > comps = readComponents(scdl::resourcePath(sc.contributionPath, sc.compositeName)); if (!hasContent(comps)) return true; const list refs = componentReferenceToTargetAssoc(content(comps));