KeepAlive: Better session cleanup after KeepAlive failure

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2025-02-13 12:53:32 +00:00
1 parent 238694fe1a
commit 60fbbd3e3b
7 files changed
+77 -24

No files matched your search

+10
View File
@@ -604,6 +604,16 @@ coap_session_t *coap_new_client_session_psk2_lkd(coap_context_t *ctx,
coap_session_t *coap_session_new_dtls_session(coap_session_t *session,
coap_tick_t now);
/**
* Clear down a session following a keepalive failure.
* The event handler will get notified of the failure.
* Note: the @p session cannot be used after this function is called.
*
* @param session Session to clear down.
*
*/
void coap_session_server_keepalive_failed(coap_session_t *session);
void coap_session_free(coap_session_t *session);
void coap_session_mfree(coap_session_t *session);
+12
View File
@@ -167,6 +167,18 @@ int coap_delete_observer_request(coap_resource_t *resource,
*/
void coap_delete_observers(coap_context_t *context, coap_session_t *session);
/**
* Removes specific subscription for @p session for @p resource and releases
* the allocated storage.
*
* @param resource The resource
* @param session The observer's session.
* @param subscription The observer's subscription.
*/
void coap_delete_observer_internal(coap_resource_t *resource,
coap_session_t *session,
coap_subscription_t *subscription);
/**
* Initiate the sending of an Observe packet for all observers of @p resource,
* optionally matching @p query if not NULL