From 03b39aa9d6e3d0153f2a0facf7796b455e0f3b67 Mon Sep 17 00:00:00 2001 From: yzh <570350928@qq.com> Date: Wed, 26 Nov 2025 11:29:00 +0800 Subject: [PATCH] [bugfix] sned finished header error --- src/hcom/transport/ub/net_ub_driver_oob.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hcom/transport/ub/net_ub_driver_oob.cpp b/src/hcom/transport/ub/net_ub_driver_oob.cpp index a25dc34..ed3cf59 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); -- Gitee