tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
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 GMT
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<bool> confComponents(Serv
     if (sc.key != "") debug(sc.key, "modeval::confComponents::sslKey");
 
     // Read the components and get their implementation lambda functions
-    const failable<list<value> > comps = readComponents(sc.contributionPath +
sc.compositeName);
+    const failable<list<value> > comps = readComponents(scdl::resourcePath(sc.contributionPath,
sc.compositeName));
     if (!hasContent(comps))
         return mkfailure<bool>(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<list<value> > comps = readComponents(sc.contributionPath +
sc.compositeName);
+    const failable<list<value> > comps = readComponents(scdl::resourcePath(sc.contributionPath,
sc.compositeName));
     if (!hasContent(comps))
         return true;
     const list<value> refs = componentReferenceToTargetAssoc(content(comps));



Mime
View raw message