summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-03-16 12:53:40 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-03-16 12:53:40 +0900
commitdfdf98d2f7d969f0295d940e7101befd2dbaf7a3 (patch)
tree4226ead0a3d9d9b5f83df653dd554373fd849a5e /src
parentf999c2bcaeb0e3b5dea6cb9a7d8fb52fb54be1e5 (diff)
Fixed segmentation fault when JSON-RPC request cannot be parsed or is
invalid.
Diffstat (limited to 'src')
-rw-r--r--src/HttpServerBodyCommand.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index a545b1f6..ff086771 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -232,8 +232,7 @@ bool HttpServerBodyCommand::execute()
getCuid()),
e);
rpc::RpcResponse res
- (createJsonRpcErrorResponse
- (-32700, "Parse error.", SharedHandle<ValueBase>()));
+ (createJsonRpcErrorResponse(-32700, "Parse error.", Null::g()));
sendJsonRpcResponse(res, callback);
return true;
}
@@ -258,7 +257,7 @@ bool HttpServerBodyCommand::execute()
} else {
rpc::RpcResponse res
(createJsonRpcErrorResponse
- (-32600, "Invalid Request.", SharedHandle<ValueBase>()));
+ (-32600, "Invalid Request.", Null::g()));
sendJsonRpcResponse(res, callback);
}
}