libcoap  4.3.0
cov_session_reference_model.c
Go to the documentation of this file.
1 /* cov-make-library -of memory_models.xmldb cov_session_reference_model.c
2  * cov-analyze --dir ... --user-model-file memory_models.xmldb
3  */
4 
5 typedef struct coap_session_t {
6  int ref;
8 
10  ++session->ref;
11  return session;
12 }
13 
15  if (session) {
16  --session->ref;
17  __coverity_negative_sink__(session->ref);
18  }
19 }
struct coap_session_t coap_session_t
coap_session_t * coap_session_reference(coap_session_t *session)
Increment reference counter on a session.
void coap_session_release(coap_session_t *session)
Decrement reference counter on a session.
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...