If check_id passed to cynara_async_cancel_request() is invalid
CYNARA_API_INVALID_PARAM will be returned.
Id is invalid when:
* was never generated by any previous call to cynara_async_create_request();
* response callback related to this id was already delivered.
Change-Id: Iaa05fe71c752aedcb5414d162fc374f37420f36d
auto it = m_checks.find(checkId);
if (it == m_checks.end() || it->second.cancelled())
- return CYNARA_API_SUCCESS;
+ return CYNARA_API_INVALID_PARAM;
m_socketClient->appendRequest(std::make_shared<CancelRequest>(it->first));
* cynara_status_callback callback may be triggered to be able to send cancel to cynara.
* cynara_response_callback callback will be triggered with with
* cynara_async_call_cause::CYNARA_CALL_CAUSE_CANCEL as cause param.
+ * If given id is not valid (was not requested or response callback was already delivered)
+ * cynara_async_cancel_request() returns CYNARA_API_INVALID_PARAM.
*
* \par Sync (or) Async:
* This is a synchronous API.