From 96dd2d5cd1b66eea0eaa5cf1f109621a4d6b5bd2 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Tue, 21 Sep 2010 05:56:51 +0000 Subject: 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 --- sca-cpp/trunk/modules/json/json.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sca-cpp') 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 jsonValues(const list& 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) -- cgit v1.2.3