diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_rpc_json.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp index 0502c7cbd..c0e4e14d9 100644 --- a/src/modules/m_rpc_json.cpp +++ b/src/modules/m_rpc_json.cpp @@ -32,7 +32,8 @@ class ModuleRpcJson : public Module { void MthModuleVersion (HTTPRequest *http, json::Value &request, json::Value &response) { - std::string result = "GetVersion().ToString()"; + Version v = this->GetVersion(); + std::string result = ConvToStr(v.Major) + "." + ConvToStr(v.Minor) + "." + ConvToStr(v.Revision) + "." + ConvToStr(v.Build); response["result"] = result; } @@ -2079,9 +2080,14 @@ namespace json Value response (objectValue); Reader r; Writer w; - + + response["error"] = Value(nullValue); + response["result"] = Value(nullValue); + parse_success = r.parse (request_text, request_text + strlen (request_text), request); - + + response["id"] = request["id"]; + service (http, request, response); text = w.write (response); |