mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-18 15:28:15 +00:00
fix p2p conn stuck on channel open failed
Signed-off-by: samuel.shi <shixintao1@huawei.com> Change-Id: I3710db86e6eb78cbcfe3cfc38bc814c030f20e8e
This commit is contained in:
parent
0836f4b18c
commit
a7b282ce8a
@ -143,17 +143,13 @@ int32_t TransClientProxy::OnChannelOpenFailed(int32_t channelId, int32_t channel
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
MessageOption option = { MessageOption::TF_ASYNC };
|
||||
if (remote->SendRequest(CLIENT_ON_CHANNEL_OPENFAILED, data, reply, option) != 0) {
|
||||
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "OnChannelOpenFailed send request failed");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
int32_t serverRet;
|
||||
if (!reply.ReadInt32(serverRet)) {
|
||||
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "OnChannelOpenFailed read serverRet failed");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
return serverRet;
|
||||
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
||||
int32_t TransClientProxy::OnChannelLinkDown(const char *networkId, int32_t routeType)
|
||||
|
@ -298,13 +298,11 @@ int32_t SoftBusClientStub::OnChannelOpenFailedInner(MessageParcel &data, Message
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
|
||||
int ret = OnChannelOpenFailed(channelId, channelType, errCode);
|
||||
bool res = reply.WriteInt32(ret);
|
||||
if (!res) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "OnChannelOpenFailedInner write reply failed!");
|
||||
return SOFTBUS_ERR;
|
||||
int32_t ret = OnChannelOpenFailed(channelId, channelType, errCode);
|
||||
if (ret != SOFTBUS_OK) {
|
||||
SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "OnChannelOpenFailed failed! ret=%d.", ret);
|
||||
}
|
||||
return SOFTBUS_OK;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t SoftBusClientStub::OnChannelLinkDownInner(MessageParcel &data, MessageParcel &reply)
|
||||
|
Loading…
Reference in New Issue
Block a user