+17
−2
Loading
This patch updates the RPC server APIs spdk_jsonrpc_send_error_response() and spdk_jsonrpc_send_error_response_fmt() to reset the response context before formatting and sending the error response. This ensures that these APIs can be safely called even after a partial response has been written to the buffer, simplifying error handling for complex or multi-stage RPCs. Change-Id: I3876b7145ea289e1e70cf7bb8730bf12777416ba Signed-off-by:Anton Nayshtut <anayshtut@nvidia.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/25986 Reviewed-by:
Konrad Sztyber <ksztyber@nvidia.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com>