Change-Id: I3f961813c36880e95cbfcf4349290a59e99c52de
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
* @return @c 0 on success,
* otherwise a negative error value
* @retval #RPC_PORT_ERROR_NONE Successful
- * @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL
+ * @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a port is NULL
* @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error
* @see rpc_port_parcel_destroy()
* @see rpc_port_parcel_send()
int len;
unsigned char* buf;
+ if (port == nullptr)
+ return RPC_PORT_ERROR_INVALID_PARAMETER;
+
internal::Port* pt = static_cast<internal::Port*>(port);
{
std::lock_guard<std::recursive_mutex> lock(pt->GetMutex());
}
RPC_API int rpc_port_parcel_send(rpc_port_parcel_h h, rpc_port_h port) {
+ if (h == nullptr || port == nullptr)
+ return RPC_PORT_ERROR_INVALID_PARAMETER;
+
Parcel* p = static_cast<Parcel*>(h);
int len = p->GetRaw().size();