Lines Matching refs:test_payload

152   coap_payload_t *test_payload;  in hnd_get_resource()  local
155 test_payload = coap_find_payload(resource->key); in hnd_get_resource()
156 if (!test_payload) { in hnd_get_resource()
165 coap_encode_var_bytes(buf, test_payload->media_type), buf); in hnd_get_resource()
168 if (test_payload->flags & REQUIRE_ETAG) { in hnd_get_resource()
170 coap_hash(test_payload->data, test_payload->length, etag); in hnd_get_resource()
179 test_payload->length); in hnd_get_resource()
195 coap_add_block(response, test_payload->length, test_payload->data, in hnd_get_resource()
198 if (!coap_add_data(response, test_payload->length, test_payload->data)) { in hnd_get_resource()
203 test_payload->length); in hnd_get_resource()
205 coap_add_block(response, test_payload->length, test_payload->data, in hnd_get_resource()
244 coap_payload_t *test_payload; in hnd_post_test() local
259 test_payload = coap_new_payload(len); in hnd_post_test()
261 if (!(test_payload && uri)) { in hnd_post_test()
264 coap_free(test_payload); in hnd_post_test()
270 uri->length = min(l, snprintf((char *)uri->data, l, "test/%p", test_payload)); in hnd_post_test()
271 test_payload->length = len; in hnd_post_test()
273 memcpy(test_payload->data, data, len); in hnd_post_test()
282 test_payload->media_type = in hnd_post_test()
287 coap_add_payload(r->key, test_payload, uri); in hnd_post_test()
535 coap_payload_t *test_payload; in init_resources() local
537 test_payload = coap_new_payload(200); in init_resources()
538 if (!test_payload) in init_resources()
541 test_payload->length = 13; in init_resources()
542 memcpy(test_payload->data, "put data here", test_payload->length); in init_resources()
558 coap_add_payload(r->key, test_payload, NULL); in init_resources()
563 test_payload = make_large("etsi_iot_01_largedata.txt"); in init_resources()
564 if (!test_payload) in init_resources()
574 test_payload->flags |= REQUIRE_ETAG; in init_resources()
576 coap_add_payload(r->key, test_payload, NULL); in init_resources()
580 test_payload = coap_new_payload(20); in init_resources()
581 if (!test_payload) in init_resources()
584 test_payload->length = 10; in init_resources()
585 memcpy(test_payload->data, "segsegseg!", test_payload->length); in init_resources()
594 coap_add_payload(r->key, test_payload, NULL); in init_resources()