summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-09-21 05:56:51 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-09-21 05:56:51 +0000
commit96dd2d5cd1b66eea0eaa5cf1f109621a4d6b5bd2 (patch)
tree6beab7e7fa0d4a5f66454076668fb77b109c8d02 /sca-cpp/trunk
parent28d603fdacd338dacd1ccc58aca909e6757f8f03 (diff)
Strip the leading '.' added by some JSON-RPC clients to method names.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@999229 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk')
-rw-r--r--sca-cpp/trunk/modules/json/json.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sca-cpp/trunk/modules/json/json.hpp b/sca-cpp/trunk/modules/json/json.hpp
index fdf752a362..94d37866a3 100644
--- a/sca-cpp/trunk/modules/json/json.hpp
+++ b/sca-cpp/trunk/modules/json/json.hpp
@@ -400,9 +400,11 @@ const list<value> jsonValues(const list<value>& e) {
/**
* Return a portable function name from a JSON-RPC function name.
- * Strip the "system." and "Service." prefixes added by some JSON-RPC clients.
+ * Strip the ".", "system." and "Service." prefixes added by some JSON-RPC clients.
*/
const string funcName(const string& f) {
+ if (length(f) > 1 && find(f, ".", 0) == 0)
+ return c_str(f) + 1;
if (length(f) > 7 && find(f, "system.", 0) == 0)
return c_str(f) + 7;
if (length(f) > 8 && find(f, "Service.", 0) == 0)