Lines Matching refs:s

112     unsigned char *next_token = text->s;  in match()
129 memcmp(token, pattern->s, pattern->length) == 0) in match()
136 memcmp(text->s, pattern->s, pattern->length) == 0; in match()
192 resource_param.s = COAP_OPT_VALUE(query_filter);
194 && resource_param.s[resource_param.length] != '=')
200 memcmp(resource_param.s, "href", 4) == 0)
203 for (rt_attributes = _rt_attributes; rt_attributes->s; rt_attributes++) {
205 memcmp(resource_param.s, rt_attributes->s, rt_attributes->length) == 0) {
212 query_pattern.s =
219 if ((query_pattern.s[0] == '/') && ((flags & MATCH_URI) == MATCH_URI)) {
220 query_pattern.s++;
225 query_pattern.s[query_pattern.length-1] == '*') {
244 attr = coap_find_attr(r, resource_param.s, resource_param.length);
246 …if (attr->value.s[0] == '"') { /* if attribute has a quoted value, remove double quotes */
248 unquoted_val.s = attr->value.s + 1;
300 r->uri.s = (unsigned char *)uri;
303 coap_hash_path(r->uri.s, r->uri.length, r->key);
334 attr->name.s = (unsigned char *)name;
335 attr->value.s = (unsigned char *)val;
358 memcmp(attr->name.s, name, nlen) == 0)
370 coap_free(attr->name.s);
372 coap_free(attr->value.s);
414 coap_free(resource->uri.s);
490 resource->uri.s, resource->uri.length, *len);
499 attr->name.s, attr->name.length, *len);
501 if (attr->value.s) {
505 attr->value.s, attr->value.length, *len);
525 coap_subscription_t *s; local
530 LL_FOREACH(resource->subscribers, s) {
531 if (coap_address_equals(&s->subscriber, peer)
532 && (!token || (token->length == s->token_length
533 && memcmp(token->s, s->token, token->length) == 0)))
534 return s;
545 coap_subscription_t *s; local
550 s = coap_find_observer(resource, observer, token);
553 if (s)
554 return s;
558 s = COAP_MALLOC_TYPE(subscription);
560 if (!s)
563 coap_subscription_init(s);
564 s->local_if = *local_interface;
565 memcpy(&s->subscriber, observer, sizeof(coap_address_t));
568 s->token_length = token->length;
569 memcpy(s->token, token->s, min(s->token_length, 8));
573 LL_PREPEND(resource->subscribers, s);
575 return s;
581 coap_subscription_t *s; local
584 s = coap_find_observer(r, observer, token);
585 if (s) {
586 s->fail_cnt = 0;
594 coap_subscription_t *s; local
596 s = coap_find_observer(resource, observer, token);
598 if (resource->subscribers && s) {
599 LL_DELETE(resource->subscribers, s);
601 COAP_FREE_TYPE(subscription,s);
604 return s != NULL;
647 token.s = obs->token;
715 memcmp(token->s, obs->token, token->length) == 0) {