提交 c3cd425f 编写于 作者: F fanxiaoyu

Fix rpc session bug when there are more than one SA in open process.

Signed-off-by: Nfanxiaoyu <fanxiaoyu3@huawei.com>
上级 2bf73ced
...@@ -66,9 +66,8 @@ public: ...@@ -66,9 +66,8 @@ public:
int InvokeListenThread(MessageParcel &data, MessageParcel &reply); int InvokeListenThread(MessageParcel &data, MessageParcel &reply);
int32_t NoticeServiceDie(); int32_t NoticeServiceDie();
std::string GetPidAndUidInfo(); std::string GetPidAndUidInfo(int32_t systemAbilityId);
std::string GetDataBusName(int32_t systemAbilityId);
std::string GetDataBusName();
std::string TransDataBusName(uint32_t uid, uint32_t pid); std::string TransDataBusName(uint32_t uid, uint32_t pid);
int GetProto() const; int GetProto() const;
void WaitForInit(); void WaitForInit();
......
...@@ -83,8 +83,8 @@ public: ...@@ -83,8 +83,8 @@ public:
private: private:
int32_t GrantDataBusName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t GrantDataBusName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option);
int32_t TransDataBusName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t TransDataBusName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option);
std::string CreateDatabusName(int uid, int pid); std::string CreateDatabusName(int uid, int pid, int systemAbilityId);
std::string GetDataBusName(); std::string GetDataBusName(int32_t systemAbilityId);
bool IsSamgrCall(uint32_t accessToken); bool IsSamgrCall(uint32_t accessToken);
bool HasDumpPermission(uint32_t accessToken) const; bool HasDumpPermission(uint32_t accessToken) const;
#endif #endif
......
...@@ -160,7 +160,7 @@ private: ...@@ -160,7 +160,7 @@ private:
bool OnRemoteInvokerDataBusMessage(IPCObjectProxy *proxy, struct DHandleEntryTxRx *replyMessage, bool OnRemoteInvokerDataBusMessage(IPCObjectProxy *proxy, struct DHandleEntryTxRx *replyMessage,
std::string &remoteDeviceId, int pid, int uid); std::string &remoteDeviceId, int pid, int uid);
bool IsDeviceIdIllegal(const std::string &deviceID); bool IsDeviceIdIllegal(const std::string &deviceID);
std::string GetDatabusNameByProxy(IPCObjectProxy *proxy); std::string GetDatabusNameByProxy(IPCObjectProxy *proxy, int32_t systemAbilityId);
uint32_t GetSeqNumber(); uint32_t GetSeqNumber();
bool RegisterRemoteProxyInner(std::u16string serviceName, binder_uintptr_t binder); bool RegisterRemoteProxyInner(std::u16string serviceName, binder_uintptr_t binder);
bool CheckSystemAbilityId(int32_t systemAbilityId); bool CheckSystemAbilityId(int32_t systemAbilityId);
......
...@@ -145,11 +145,12 @@ std::u16string IPCObjectProxy::GetInterfaceDescriptor() ...@@ -145,11 +145,12 @@ std::u16string IPCObjectProxy::GetInterfaceDescriptor()
return remoteDescriptor_; return remoteDescriptor_;
} }
std::string IPCObjectProxy::GetPidAndUidInfo() std::string IPCObjectProxy::GetPidAndUidInfo(int32_t systemAbilityId)
{ {
MessageParcel data, reply; MessageParcel data, reply;
MessageOption option; MessageOption option;
data.WriteInt32(systemAbilityId);
int32_t err = SendRequestInner(false, GET_UIDPID_INFO, data, reply, option); int32_t err = SendRequestInner(false, GET_UIDPID_INFO, data, reply, option);
if (err != ERR_NONE) { if (err != ERR_NONE) {
ZLOGE(LABEL, "GetPidAndUidInfo SendRequestInner return error = %{public}d", err); ZLOGE(LABEL, "GetPidAndUidInfo SendRequestInner return error = %{public}d", err);
...@@ -158,11 +159,12 @@ std::string IPCObjectProxy::GetPidAndUidInfo() ...@@ -158,11 +159,12 @@ std::string IPCObjectProxy::GetPidAndUidInfo()
return reply.ReadString(); return reply.ReadString();
} }
std::string IPCObjectProxy::GetDataBusName() std::string IPCObjectProxy::GetDataBusName(int32_t systemAbilityId)
{ {
MessageParcel data, reply; MessageParcel data, reply;
MessageOption option; MessageOption option;
data.WriteInt32(systemAbilityId);
int32_t err = SendRequestInner(false, GRANT_DATABUS_NAME, data, reply, option); int32_t err = SendRequestInner(false, GRANT_DATABUS_NAME, data, reply, option);
if (err != ERR_NONE) { if (err != ERR_NONE) {
ZLOGE(LABEL, "GetDataBusName transact return error = %{public}d", err); ZLOGE(LABEL, "GetDataBusName transact return error = %{public}d", err);
...@@ -260,21 +262,16 @@ void IPCObjectProxy::OnLastStrongRef(const void *objectId) ...@@ -260,21 +262,16 @@ void IPCObjectProxy::OnLastStrongRef(const void *objectId)
ZLOGE(LABEL, "OnLastStrongRef current is null"); ZLOGE(LABEL, "OnLastStrongRef current is null");
return; return;
} }
#ifndef CONFIG_IPC_SINGLE if (current->DetachObject(this) == false) { // if detach successfully, this proxy will be destroyed
std::shared_ptr<DBinderSessionObject> session = nullptr;
#endif
{
std::lock_guard<std::recursive_mutex> lock(current->mutex_);
if (current->DetachObjectInner(this) == false) { // if detach successfully, this proxy will be destroyed
return; return;
} }
#ifndef CONFIG_IPC_SINGLE #ifndef CONFIG_IPC_SINGLE
ReleaseProto(); ReleaseProto();
std::shared_ptr<DBinderSessionObject> session = nullptr;
session = current->ProxyQueryDBinderSession(handle_); session = current->ProxyQueryDBinderSession(handle_);
(void)current->ProxyDetachDBinderSession(handle_); (void)current->ProxyDetachDBinderSession(handle_);
(void)current->DetachHandleToIndex(handle_); (void)current->DetachHandleToIndex(handle_);
#endif #endif
}
IRemoteInvoker *invoker = IPCThreadSkeleton::GetDefaultInvoker(); IRemoteInvoker *invoker = IPCThreadSkeleton::GetDefaultInvoker();
if (invoker != nullptr) { if (invoker != nullptr) {
invoker->ReleaseHandle(handle_); invoker->ReleaseHandle(handle_);
......
...@@ -241,7 +241,8 @@ int IPCObjectStub::SendRequest(uint32_t code, MessageParcel &data, MessageParcel ...@@ -241,7 +241,8 @@ int IPCObjectStub::SendRequest(uint32_t code, MessageParcel &data, MessageParcel
result = IPC_STUB_INVALID_DATA_ERR; result = IPC_STUB_INVALID_DATA_ERR;
break; break;
} }
std::string sessionName = GetDataBusName(); int32_t systemAbilityId = data.ReadInt32();
std::string sessionName = GetDataBusName(systemAbilityId);
if (sessionName.empty()) { if (sessionName.empty()) {
ZLOGE(LABEL, "sessionName is empty"); ZLOGE(LABEL, "sessionName is empty");
result = IPC_STUB_CREATE_BUS_SERVER_ERR; result = IPC_STUB_CREATE_BUS_SERVER_ERR;
...@@ -456,7 +457,6 @@ int32_t IPCObjectStub::IncStubRefs(MessageParcel &data, MessageParcel &reply) ...@@ -456,7 +457,6 @@ int32_t IPCObjectStub::IncStubRefs(MessageParcel &data, MessageParcel &reply)
ZLOGE(LABEL, "%s: current is null", __func__); ZLOGE(LABEL, "%s: current is null", __func__);
return IPC_STUB_CURRENT_NULL_ERR; return IPC_STUB_CURRENT_NULL_ERR;
} }
std::string deviceId = IPCSkeleton::GetCallingDeviceID(); std::string deviceId = IPCSkeleton::GetCallingDeviceID();
if (deviceId.empty()) { if (deviceId.empty()) {
ZLOGE(LABEL, "%s: calling error", __func__); ZLOGE(LABEL, "%s: calling error", __func__);
...@@ -466,11 +466,9 @@ int32_t IPCObjectStub::IncStubRefs(MessageParcel &data, MessageParcel &reply) ...@@ -466,11 +466,9 @@ int32_t IPCObjectStub::IncStubRefs(MessageParcel &data, MessageParcel &reply)
ZLOGE(LABEL, "%s: attach stub ref info err, already in", __func__); ZLOGE(LABEL, "%s: attach stub ref info err, already in", __func__);
return ERR_NONE; return ERR_NONE;
} }
if (!current->DecStubRefTimes(this)) { if (!current->DecStubRefTimes(this)) {
this->IncStrongRef(this); this->IncStrongRef(this);
} }
return ERR_NONE; return ERR_NONE;
} }
...@@ -531,7 +529,7 @@ int32_t IPCObjectStub::AddAuthInfo(MessageParcel &data, MessageParcel &reply, ui ...@@ -531,7 +529,7 @@ int32_t IPCObjectStub::AddAuthInfo(MessageParcel &data, MessageParcel &reply, ui
return ERR_NONE; return ERR_NONE;
} }
std::string IPCObjectStub::GetDataBusName() std::string IPCObjectStub::GetDataBusName(int32_t systemAbilityId)
{ {
IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent();
if (current == nullptr) { if (current == nullptr) {
...@@ -545,14 +543,15 @@ std::string IPCObjectStub::GetDataBusName() ...@@ -545,14 +543,15 @@ std::string IPCObjectStub::GetDataBusName()
} }
IPCObjectProxy *samgr = reinterpret_cast<IPCObjectProxy *>(object.GetRefPtr()); IPCObjectProxy *samgr = reinterpret_cast<IPCObjectProxy *>(object.GetRefPtr());
return samgr->GetDataBusName(); return samgr->GetDataBusName(systemAbilityId);
} }
int32_t IPCObjectStub::GrantDataBusName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) int32_t IPCObjectStub::GrantDataBusName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
{ {
int pid = IPCSkeleton::GetCallingPid(); int pid = IPCSkeleton::GetCallingPid();
int uid = IPCSkeleton::GetCallingUid(); int uid = IPCSkeleton::GetCallingUid();
std::string sessionName = CreateDatabusName(uid, pid); int systemAbilityId = data.ReadInt32();
std::string sessionName = CreateDatabusName(uid, pid, systemAbilityId);
if (sessionName.empty()) { if (sessionName.empty()) {
ZLOGE(LABEL, "pid/uid is invalid, pid = {public}%d, uid = {public}%d", pid, uid); ZLOGE(LABEL, "pid/uid is invalid, pid = {public}%d, uid = {public}%d", pid, uid);
return IPC_STUB_INVALID_DATA_ERR; return IPC_STUB_INVALID_DATA_ERR;
...@@ -573,7 +572,7 @@ int32_t IPCObjectStub::TransDataBusName(uint32_t code, MessageParcel &data, Mess ...@@ -573,7 +572,7 @@ int32_t IPCObjectStub::TransDataBusName(uint32_t code, MessageParcel &data, Mess
ZLOGE(LABEL, "pid/uid is invalid, pid = {public}%d, uid = {public}%d", remotePid, remoteUid); ZLOGE(LABEL, "pid/uid is invalid, pid = {public}%d, uid = {public}%d", remotePid, remoteUid);
return IPC_STUB_INVALID_DATA_ERR; return IPC_STUB_INVALID_DATA_ERR;
} }
std::string sessionName = CreateDatabusName(remoteUid, remotePid); std::string sessionName = CreateDatabusName(remoteUid, remotePid, 0);
if (sessionName.empty()) { if (sessionName.empty()) {
ZLOGE(LABEL, "pid/uid is invalid, pid = {public}%d, uid = {public}%d", remotePid, remoteUid); ZLOGE(LABEL, "pid/uid is invalid, pid = {public}%d, uid = {public}%d", remotePid, remoteUid);
return IPC_STUB_INVALID_DATA_ERR; return IPC_STUB_INVALID_DATA_ERR;
...@@ -586,7 +585,7 @@ int32_t IPCObjectStub::TransDataBusName(uint32_t code, MessageParcel &data, Mess ...@@ -586,7 +585,7 @@ int32_t IPCObjectStub::TransDataBusName(uint32_t code, MessageParcel &data, Mess
return ERR_NONE; return ERR_NONE;
} }
std::string IPCObjectStub::CreateDatabusName(int uid, int pid) std::string IPCObjectStub::CreateDatabusName(int uid, int pid, int systemAbilityId)
{ {
std::shared_ptr<ISessionService> softbusManager = ISessionService::GetInstance(); std::shared_ptr<ISessionService> softbusManager = ISessionService::GetInstance();
if (softbusManager == nullptr) { if (softbusManager == nullptr) {
...@@ -595,6 +594,9 @@ std::string IPCObjectStub::CreateDatabusName(int uid, int pid) ...@@ -595,6 +594,9 @@ std::string IPCObjectStub::CreateDatabusName(int uid, int pid)
} }
std::string sessionName = "DBinder" + std::to_string(uid) + std::string("_") + std::to_string(pid); std::string sessionName = "DBinder" + std::to_string(uid) + std::string("_") + std::to_string(pid);
if (systemAbilityId > 0) {
sessionName += std::string("_") + std::to_string(systemAbilityId);
}
if (softbusManager->GrantPermission(uid, pid, sessionName) != ERR_NONE) { if (softbusManager->GrantPermission(uid, pid, sessionName) != ERR_NONE) {
ZLOGE(LABEL, "fail to Grant Permission softbus name"); ZLOGE(LABEL, "fail to Grant Permission softbus name");
return ""; return "";
......
...@@ -467,7 +467,6 @@ bool IPCProcessSkeleton::QueryProxyBySessionHandle(uint32_t handle, std::vector< ...@@ -467,7 +467,6 @@ bool IPCProcessSkeleton::QueryProxyBySessionHandle(uint32_t handle, std::vector<
proxyHandle.push_back(it->first); proxyHandle.push_back(it->first);
} }
} }
return true; return true;
} }
...@@ -1207,7 +1206,6 @@ bool IPCProcessSkeleton::AttachCommAuthInfo(IRemoteObject *stub, int pid, int ui ...@@ -1207,7 +1206,6 @@ bool IPCProcessSkeleton::AttachCommAuthInfo(IRemoteObject *stub, int pid, int ui
auto check = [&stub, &pid, &uid, &deviceId, this](const std::shared_ptr<CommAuthInfo> &auth) { auto check = [&stub, &pid, &uid, &deviceId, this](const std::shared_ptr<CommAuthInfo> &auth) {
return IsSameRemoteObject(stub, pid, uid, deviceId, auth); return IsSameRemoteObject(stub, pid, uid, deviceId, auth);
}; };
std::unique_lock<std::shared_mutex> lockGuard(commAuthMutex_); std::unique_lock<std::shared_mutex> lockGuard(commAuthMutex_);
auto it = std::find_if(commAuth_.begin(), commAuth_.end(), check); auto it = std::find_if(commAuth_.begin(), commAuth_.end(), check);
if (it != commAuth_.end()) { if (it != commAuth_.end()) {
...@@ -1225,7 +1223,6 @@ void IPCProcessSkeleton::DetachCommAuthInfo(IRemoteObject *stub, int pid, int ui ...@@ -1225,7 +1223,6 @@ void IPCProcessSkeleton::DetachCommAuthInfo(IRemoteObject *stub, int pid, int ui
auto check = [&stub, &pid, &uid, &deviceId, this](const std::shared_ptr<CommAuthInfo> &auth) { auto check = [&stub, &pid, &uid, &deviceId, this](const std::shared_ptr<CommAuthInfo> &auth) {
return IsSameRemoteObject(stub, pid, uid, deviceId, auth); return IsSameRemoteObject(stub, pid, uid, deviceId, auth);
}; };
std::unique_lock<std::shared_mutex> lockGuard(commAuthMutex_); std::unique_lock<std::shared_mutex> lockGuard(commAuthMutex_);
commAuth_.remove_if(check); commAuth_.remove_if(check);
} }
...@@ -1235,7 +1232,6 @@ std::shared_ptr<FeatureSetData> IPCProcessSkeleton::QueryIsAuth(int pid, int uid ...@@ -1235,7 +1232,6 @@ std::shared_ptr<FeatureSetData> IPCProcessSkeleton::QueryIsAuth(int pid, int uid
auto check = [&pid, &uid, &deviceId, this](const std::shared_ptr<CommAuthInfo> &auth) { auto check = [&pid, &uid, &deviceId, this](const std::shared_ptr<CommAuthInfo> &auth) {
return IsSameRemoteObject(pid, uid, deviceId, auth); return IsSameRemoteObject(pid, uid, deviceId, auth);
}; };
std::shared_lock<std::shared_mutex> lockGuard(commAuthMutex_); std::shared_lock<std::shared_mutex> lockGuard(commAuthMutex_);
auto it = std::find_if(commAuth_.begin(), commAuth_.end(), check); auto it = std::find_if(commAuth_.begin(), commAuth_.end(), check);
if (it != commAuth_.end()) { if (it != commAuth_.end()) {
......
...@@ -570,7 +570,7 @@ int BinderInvoker::HandleReply(MessageParcel *reply) ...@@ -570,7 +570,7 @@ int BinderInvoker::HandleReply(MessageParcel *reply)
int BinderInvoker::HandleCommandsInner(uint32_t cmd) int BinderInvoker::HandleCommandsInner(uint32_t cmd)
{ {
int error = ERR_NONE; int error = ERR_NONE;
ZLOGD(LABEL, "HandleCommands:cmd:%{public}u\n", cmd); ZLOGD(LABEL, "HandleCommands:cmd:%{public}u", cmd);
switch (cmd) { switch (cmd) {
case BR_ERROR: case BR_ERROR:
error = input_.ReadInt32(); error = input_.ReadInt32();
...@@ -679,7 +679,7 @@ int BinderInvoker::TransactWithDriver(bool doRead) ...@@ -679,7 +679,7 @@ int BinderInvoker::TransactWithDriver(bool doRead)
bwr.write_consumed = 0; bwr.write_consumed = 0;
bwr.read_consumed = 0; bwr.read_consumed = 0;
ZLOGD(LABEL, "TransactWithDriver write_size:%lld, read_size:%lld\n", bwr.write_size, bwr.read_size); ZLOGD(LABEL, "TransactWithDriver write_size:%lld, read_size:%lld", bwr.write_size, bwr.read_size);
int error = binderConnector_->WriteBinder(BINDER_WRITE_READ, &bwr); int error = binderConnector_->WriteBinder(BINDER_WRITE_READ, &bwr);
if (bwr.write_consumed > 0) { if (bwr.write_consumed > 0) {
if (bwr.write_consumed < output_.GetDataSize()) { if (bwr.write_consumed < output_.GetDataSize()) {
...@@ -693,7 +693,7 @@ int BinderInvoker::TransactWithDriver(bool doRead) ...@@ -693,7 +693,7 @@ int BinderInvoker::TransactWithDriver(bool doRead)
input_.RewindRead(0); input_.RewindRead(0);
} }
if (error != ERR_NONE) { if (error != ERR_NONE) {
ZLOGE(LABEL, "TransactWithDriver result = %{public}d\n", error); ZLOGE(LABEL, "TransactWithDriver result = %{public}d", error);
} }
return error; return error;
...@@ -908,6 +908,8 @@ bool BinderInvoker::FlattenObject(Parcel &parcel, const IRemoteObject *object) c ...@@ -908,6 +908,8 @@ bool BinderInvoker::FlattenObject(Parcel &parcel, const IRemoteObject *object) c
flat.hdr.type = BINDER_TYPE_BINDER; flat.hdr.type = BINDER_TYPE_BINDER;
flat.binder = reinterpret_cast<uintptr_t>(object); flat.binder = reinterpret_cast<uintptr_t>(object);
flat.cookie = flat.binder; flat.cookie = flat.binder;
ZLOGD(LABEL, "write stub object: %{public}s, ptr=%{public}p",
Str16ToStr8(object->GetObjectDescriptor()).c_str(), object);
} }
flat.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; flat.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
......
...@@ -79,7 +79,6 @@ std::shared_ptr<DBinderSessionObject> DBinderDatabusInvoker::NewSessionOfBinderP ...@@ -79,7 +79,6 @@ std::shared_ptr<DBinderSessionObject> DBinderDatabusInvoker::NewSessionOfBinderP
DBINDER_LOGE("current ipc process skeleton is nullptr"); DBINDER_LOGE("current ipc process skeleton is nullptr");
return nullptr; return nullptr;
} }
sptr<IPCObjectProxy> ipcProxy = reinterpret_cast<IPCObjectProxy *>(current->FindOrNewObject(handle).GetRefPtr()); sptr<IPCObjectProxy> ipcProxy = reinterpret_cast<IPCObjectProxy *>(current->FindOrNewObject(handle).GetRefPtr());
if (ipcProxy == nullptr) { if (ipcProxy == nullptr) {
DBINDER_LOGE("attempt to send a invalid handle = %u", handle); DBINDER_LOGE("attempt to send a invalid handle = %u", handle);
...@@ -91,7 +90,7 @@ std::shared_ptr<DBinderSessionObject> DBinderDatabusInvoker::NewSessionOfBinderP ...@@ -91,7 +90,7 @@ std::shared_ptr<DBinderSessionObject> DBinderDatabusInvoker::NewSessionOfBinderP
return nullptr; return nullptr;
} }
std::string sessionName = ipcProxy->GetPidAndUidInfo(); std::string sessionName = ipcProxy->GetPidAndUidInfo(0);
if (sessionName.empty()) { if (sessionName.empty()) {
DBINDER_LOGE("get bus name error"); DBINDER_LOGE("get bus name error");
return nullptr; return nullptr;
...@@ -324,6 +323,7 @@ void DBinderDatabusInvoker::OnMessageAvailable(std::shared_ptr<Session> session, ...@@ -324,6 +323,7 @@ void DBinderDatabusInvoker::OnMessageAvailable(std::shared_ptr<Session> session,
readSize += packageSize; readSize += packageSize;
} else { } else {
// If the current is abnormal, the subsequent is no longer processed. // If the current is abnormal, the subsequent is no longer processed.
DBINDER_LOGE("not complete message");
break; break;
} }
} while (readSize + sizeof(dbinder_transaction_data) < static_cast<uint32_t>(len)); } while (readSize + sizeof(dbinder_transaction_data) < static_cast<uint32_t>(len));
......
...@@ -490,7 +490,7 @@ bool DBinderService::OnRemoteInvokerMessage(const struct DHandleEntryTxRx *messa ...@@ -490,7 +490,7 @@ bool DBinderService::OnRemoteInvokerMessage(const struct DHandleEntryTxRx *messa
return true; return true;
} }
std::string DBinderService::GetDatabusNameByProxy(IPCObjectProxy *proxy) std::string DBinderService::GetDatabusNameByProxy(IPCObjectProxy *proxy, int32_t systemAbilityId)
{ {
if (proxy == nullptr) { if (proxy == nullptr) {
DBINDER_LOGE("proxy can not be null"); DBINDER_LOGE("proxy can not be null");
...@@ -501,7 +501,7 @@ std::string DBinderService::GetDatabusNameByProxy(IPCObjectProxy *proxy) ...@@ -501,7 +501,7 @@ std::string DBinderService::GetDatabusNameByProxy(IPCObjectProxy *proxy)
DBINDER_LOGI("sessionName has been granded"); DBINDER_LOGI("sessionName has been granded");
return sessionName; return sessionName;
} }
sessionName = proxy->GetPidAndUidInfo(); sessionName = proxy->GetPidAndUidInfo(systemAbilityId);
if (sessionName.empty()) { if (sessionName.empty()) {
DBINDER_LOGE("grand session name failed"); DBINDER_LOGE("grand session name failed");
return ""; return "";
...@@ -556,7 +556,7 @@ bool DBinderService::OnRemoteInvokerDataBusMessage(IPCObjectProxy *proxy, struct ...@@ -556,7 +556,7 @@ bool DBinderService::OnRemoteInvokerDataBusMessage(IPCObjectProxy *proxy, struct
DBINDER_LOGE("remote device id is error"); DBINDER_LOGE("remote device id is error");
return false; return false;
} }
std::string sessionName = GetDatabusNameByProxy(proxy); std::string sessionName = GetDatabusNameByProxy(proxy, replyMessage->stubIndex);
if (sessionName.empty()) { if (sessionName.empty()) {
DBINDER_LOGE("get bus name fail"); DBINDER_LOGE("get bus name fail");
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册