Lines Matching refs:s
26 coap_async_state_t *s; in coap_register_async() local
30 LL_SEARCH_SCALAR(context->async_state,s,id,id); in coap_register_async()
32 if (s != NULL) { in coap_register_async()
40 s = (coap_async_state_t *)coap_malloc(sizeof(coap_async_state_t) + in coap_register_async()
42 if (!s) { in coap_register_async()
47 memset(s, 0, sizeof(coap_async_state_t) + request->hdr->token_length); in coap_register_async()
50 s->flags = flags & ~COAP_ASYNC_CONFIRM; in coap_register_async()
52 s->flags |= COAP_ASYNC_CONFIRM; in coap_register_async()
54 s->appdata = data; in coap_register_async()
56 memcpy(&s->peer, peer, sizeof(coap_address_t)); in coap_register_async()
59 s->tokenlen = request->hdr->token_length; in coap_register_async()
60 memcpy(s->token, request->hdr->token, request->hdr->token_length); in coap_register_async()
63 memcpy(&s->id, &id, sizeof(coap_tid_t)); in coap_register_async()
65 coap_touch_async(s); in coap_register_async()
67 LL_PREPEND(context->async_state, s); in coap_register_async()
69 return s; in coap_register_async()
81 coap_async_state_t **s) { in coap_remove_async() argument
87 *s = tmp; in coap_remove_async()
92 coap_free_async(coap_async_state_t *s) { in coap_free_async() argument
93 if (s && (s->flags & COAP_ASYNC_RELEASE_DATA) != 0) in coap_free_async()
94 coap_free(s->appdata); in coap_free_async()
95 coap_free(s); in coap_free_async()