Lines Matching refs:r
233 RESOURCES_ITER(context->resources, r) {
239 if (!match(&r->uri, &query_pattern, (flags & MATCH_PREFIX) != 0, (flags & MATCH_SUBSTRING) != 0))
244 attr = coap_find_attr(r, resource_param.s, resource_param.length);
267 result = coap_print_link(r, p, &left, &offset);
289 coap_resource_t *r; local
292 r = (coap_resource_t *)memp_malloc(MEMP_COAP_RESOURCE);
295 r = (coap_resource_t *)coap_malloc_type(COAP_RESOURCE, sizeof(coap_resource_t));
297 if (r) {
298 memset(r, 0, sizeof(coap_resource_t));
300 r->uri.s = (unsigned char *)uri;
301 r->uri.length = len;
303 coap_hash_path(r->uri.s, r->uri.length, r->key);
305 r->flags = flags;
310 return r;
583 RESOURCES_ITER(context->resources, r) {
584 s = coap_find_observer(r, observer, token);
608 coap_notify_observers(coap_context_t *context, coap_resource_t *r) { argument
614 if (r->observable && (r->dirty || r->partiallydirty)) {
615 r->partiallydirty = 0;
618 h = r->handler[COAP_REQUEST_GET - 1];
622 LL_FOREACH(r->subscribers, obs) {
623 if (r->dirty == 0 && obs->dirty == 0)
633 r->partiallydirty = 1;
640 r->partiallydirty = 1;
650 if ((r->flags & COAP_RESOURCE_FLAGS_NOTIFY_CON) == 0
657 h(context, r, &obs->local_if, &obs->subscriber, NULL, &token, response);
676 r->partiallydirty = 1;
684 r->dirty = 0;
690 RESOURCES_ITER(context->resources, r) {
691 coap_notify_observers(context, r);
751 RESOURCES_ITER(context->resources, r) {
752 coap_remove_failed_observers(context, r, peer, token);