Lines Matching refs:obs
406 coap_subscription_t *obs, *otmp; local
417 LL_FOREACH_SAFE(resource->subscribers, obs, otmp) COAP_FREE_TYPE(subscription, obs);
610 coap_subscription_t *obs; local
622 LL_FOREACH(r->subscribers, obs) {
623 if (r->dirty == 0 && obs->dirty == 0)
628 obs->dirty = 0;
632 obs->dirty = 1;
638 if (!coap_add_token(response, obs->token_length, obs->token)) {
639 obs->dirty = 1;
646 token.length = obs->token_length;
647 token.s = obs->token;
651 && obs->non_cnt < COAP_OBS_MAX_NON) {
657 h(context, r, &obs->local_if, &obs->subscriber, NULL, &token, response);
663 tid = coap_send_confirmed(context, &obs->local_if, &obs->subscriber, response);
664 obs->non_cnt = 0;
666 tid = coap_send(context, &obs->local_if, &obs->subscriber, response);
667 obs->non_cnt++;
675 obs->dirty = 1;
710 coap_subscription_t *obs, *otmp; local
712 LL_FOREACH_SAFE(resource->subscribers, obs, otmp) {
713 if (coap_address_equals(peer, &obs->subscriber) &&
714 token->length == obs->token_length &&
715 memcmp(token->s, obs->token, token->length) == 0) {
719 if (obs->fail_cnt < COAP_OBS_MAX_FAIL)
720 obs->fail_cnt++;
722 LL_DELETE(resource->subscribers, obs);
723 obs->fail_cnt = 0;
732 if (coap_print_addr(&obs->subscriber, addr, INET6_ADDRSTRLEN+8))
736 coap_cancel_all_messages(context, &obs->subscriber,
737 obs->token, obs->token_length);
739 COAP_FREE_TYPE(subscription, obs);