diff --git a/src/hcom/transport/ub/net_ub_driver_oob.cpp b/src/hcom/transport/ub/net_ub_driver_oob.cpp index a25dc3447d01e3ff8cf55486d5f52c029b9fa7c9..ed3cf594c20596354794260439f40b768fc1019d 100644 --- a/src/hcom/transport/ub/net_ub_driver_oob.cpp +++ b/src/hcom/transport/ub/net_ub_driver_oob.cpp @@ -1364,12 +1364,13 @@ int NetDriverUBWithOob::SendFinishedCB(UBOpContextInfo *ctx) ctx->ubJetty->ReturnPostSendWr(); auto worker = reinterpret_cast(ctx->ubJetty->GetUpContext1()); if (ctx->opType == UBOpContextInfo::SEND || ctx->opType == UBOpContextInfo::SEND_RAW) { - if (ctx->opType == UBOpContextInfo::SEND && NN_UNLIKELY(memcpy_s(&(requestCtx.mHeader), - sizeof(UBSHcomNetTransHeader), reinterpret_cast(ctx->mrMemAddr), - sizeof(UBSHcomNetTransHeader)) != UB_OK)) { - NN_LOG_ERROR("Failed to copy ctx to requestCtx"); - return NN_ERROR; - } else { + if (ctx->opType == UBOpContextInfo::SEND) { + if (memcpy_s(&(requestCtx.mHeader), sizeof(UBSHcomNetTransHeader), + reinterpret_cast(ctx->mrMemAddr), sizeof(UBSHcomNetTransHeader)) != NN_OK) { + NN_LOG_ERROR("Failed to copy ctx to requestCtx"); + return NN_ERROR; + } + } else if (ctx->opType == UBOpContextInfo::SEND_RAW) { requestCtx.mHeader.Invalid(); } PrintSendFinishDebug(requestCtx.mHeader, ctx);