diff --git a/core/transmission/ipc/standard/src/trans_client_proxy_standard.cpp b/core/transmission/ipc/standard/src/trans_client_proxy_standard.cpp index fcc2d43cd..9048b4f13 100644 --- a/core/transmission/ipc/standard/src/trans_client_proxy_standard.cpp +++ b/core/transmission/ipc/standard/src/trans_client_proxy_standard.cpp @@ -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) diff --git a/sdk/frame/standard/src/softbus_client_stub.cpp b/sdk/frame/standard/src/softbus_client_stub.cpp index 14f2456d2..d42bf214c 100644 --- a/sdk/frame/standard/src/softbus_client_stub.cpp +++ b/sdk/frame/standard/src/softbus_client_stub.cpp @@ -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)