Fixed segmentation fault when JSON-RPC request cannot be parsed or is

invalid.
pull/1/head
Tatsuhiro Tsujikawa 2011-03-16 12:53:40 +09:00
parent f999c2bcae
commit dfdf98d2f7
1 changed files with 2 additions and 3 deletions

View File

@ -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);
}
}