Skip to content

Commit

Permalink
reset watchdog in any session messages.
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
qizhangz authored and jyao1 committed Feb 11, 2022
1 parent c7c4aaa commit 9e73271
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 0 additions & 7 deletions library/spdm_responder_lib/libspdm_rsp_heartbeat.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
**/

#include "internal/libspdm_responder_lib.h"
#include "hal/library/platform_lib.h"

/**
* Process the SPDM HEARTBEAT request and return the response.
Expand Down Expand Up @@ -35,7 +34,6 @@ return_status spdm_get_response_heartbeat(IN void *context,
spdm_context_t *spdm_context;
spdm_session_info_t *session_info;
libspdm_session_state_t session_state;
bool result;

spdm_context = context;
spdm_request = request;
Expand Down Expand Up @@ -105,10 +103,5 @@ return_status spdm_get_response_heartbeat(IN void *context,
spdm_response->header.param1 = 0;
spdm_response->header.param2 = 0;

result = libspdm_reset_watchdog(spdm_context->last_spdm_request_session_id);
if (!result) {
return RETURN_DEVICE_ERROR;
}

return RETURN_SUCCESS;
}
6 changes: 5 additions & 1 deletion library/spdm_responder_lib/libspdm_rsp_receive_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ return_status libspdm_build_response(IN void *context, IN uint32_t *session_id,
libspdm_free_session_id(spdm_context, *session_id);
break;
default:
/* No session state update needed */
/* reset watchdog in any session messages. */
result = libspdm_reset_watchdog(*session_id);
if (!result) {
return RETURN_DEVICE_ERROR;
}
break;
}
} else {
Expand Down

0 comments on commit 9e73271

Please sign in to comment.