Skip to content

Commit

Permalink
fix(server) check history backend for event support in history-read s…
Browse files Browse the repository at this point in the history
…ervice
  • Loading branch information
andreasebner authored and jpfr committed Jun 21, 2024
1 parent 1d5066d commit 548a2ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/server/ua_services_attribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,14 @@ Service_HistoryRead(UA_Server *server, UA_Session *session,
return;
}

/* Check if the configured History-Backend supports the requested history type */
if(!readHistory){
UA_LOG_INFO_SESSION(server->config.logging, session,
"The configured HistoryBackend does not support the selected history-type.");
response->responseHeader.serviceResult = UA_STATUSCODE_BADNOTSUPPORTED;
return;
}

/* Something to do? */
if(request->nodesToReadSize == 0) {
response->responseHeader.serviceResult = UA_STATUSCODE_BADNOTHINGTODO;
Expand Down

0 comments on commit 548a2ef

Please sign in to comment.