未验证 提交 152bc9a4 编写于 作者: 周礼亭 提交者: Gitee

Signed-off-by: zhouliting <zhouliting5@huawei.com>

上级 9c8d2cf1
......@@ -39,7 +39,7 @@ public:
class IRemoteBroker : public virtual RefBase {
public:
IRemoteBroker() = default;
~IRemoteBroker() override = default;
virtual ~IRemoteBroker() = default;
virtual sptr<IRemoteObject> AsObject() = 0;
static inline sptr<IRemoteBroker> AsImplement(const sptr<IRemoteObject> &object)
{
......
......@@ -1112,7 +1112,7 @@ napi_value NAPI_IPCSkeleton_setCallingIdentity(napi_env env, napi_callback_info
return result;
}
int64_t token = std::stoll(identity.c_str());
int64_t token = std::stoll(identity);
int callerUid = static_cast<int>((static_cast<uint64_t>(token)) >> PID_LEN);
int callerPid = static_cast<int>(token);
napi_value napiCallingPid;
......@@ -1130,7 +1130,7 @@ napi_value NAPI_IPCSkeleton_setCallingIdentity(napi_env env, napi_callback_info
}
std::string deviceId = identity.substr(0, DEVICEID_LENGTH);
int64_t token = std::stoll(identity.substr(DEVICEID_LENGTH, identity.length() - DEVICEID_LENGTH).c_str());
int64_t token = std::stoll(identity.substr(DEVICEID_LENGTH, identity.length() - DEVICEID_LENGTH));
int callerUid = static_cast<int>((static_cast<uint64_t>(token)) >> PID_LEN);
int callerPid = static_cast<int>(token);
napi_value napiCallingPid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册