Lines Matching refs:response

131 	      coap_pdu_t *response) {  in hnd_get_index()  argument
134 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_index()
136 coap_add_option(response, COAP_OPTION_CONTENT_TYPE, in hnd_get_index()
139 coap_add_option(response, COAP_OPTION_MAXAGE, in hnd_get_index()
142 coap_add_data(response, strlen(INDEX), (unsigned char *)INDEX); in hnd_get_index()
149 coap_pdu_t *response) { in hnd_get_resource() argument
157 response->hdr->code = COAP_RESPONSE_CODE(500); in hnd_get_resource()
162 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_resource()
164 coap_add_option(response, COAP_OPTION_CONTENT_TYPE, in hnd_get_resource()
171 coap_add_option(response, COAP_OPTION_ETAG, sizeof(etag), etag); in hnd_get_resource()
178 res = coap_write_block_opt(&block, COAP_OPTION_BLOCK2, response, in hnd_get_resource()
183 response->hdr->code = COAP_RESPONSE_CODE(400); in hnd_get_resource()
189 response->hdr->code = COAP_RESPONSE_CODE(500); 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()
202 coap_write_block_opt(&block, COAP_OPTION_BLOCK2, response, in hnd_get_resource()
205 coap_add_block(response, test_payload->length, test_payload->data, in hnd_get_resource()
216 coap_add_data(response, in hnd_get_resource()
217 strlen(coap_response_phrase(response->hdr->code)), in hnd_get_resource()
218 (unsigned char *)coap_response_phrase(response->hdr->code)); in hnd_get_resource()
225 coap_pdu_t *response) { in hnd_delete_resource() argument
235 response->hdr->code = COAP_RESPONSE_CODE(202); in hnd_delete_resource()
241 coap_pdu_t *response) { in hnd_post_test() argument
263 response->hdr->code = COAP_RESPONSE_CODE(500); in hnd_post_test()
293 coap_add_option(response, COAP_OPTION_LOCATION_PATH, in hnd_post_test()
299 response->hdr->code = COAP_RESPONSE_CODE(201); in hnd_post_test()
307 coap_pdu_t *response) { in hnd_put_test() argument
314 response->hdr->code = COAP_RESPONSE_CODE(204); in hnd_put_test()
352 response->hdr->code = COAP_RESPONSE_CODE(500); in hnd_put_test()
358 coap_pdu_t *response) { in hnd_delete_test() argument
368 response->hdr->code = COAP_RESPONSE_CODE(202); in hnd_delete_test()
374 coap_pdu_t *response) { in hnd_get_query() argument
381 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_query()
383 coap_add_option(response, COAP_OPTION_CONTENT_TYPE, in hnd_get_query()
405 coap_add_data(response, len, buf); in hnd_get_query()
412 coap_pdu_t *response) { in hnd_get_separate() argument
422 response->hdr->code = COAP_RESPONSE_CODE(503); in hnd_get_separate()
456 coap_pdu_t *response; in check_async() local
466 response = coap_pdu_init(async->flags & COAP_ASYNC_CONFIRM in check_async()
470 if (!response) { in check_async()
477 response->hdr->id = coap_new_message_id(ctx); in check_async()
480 coap_add_token(response, async->tokenlen, async->token); in check_async()
482 coap_add_option(response, COAP_OPTION_CONTENT_TYPE, in check_async()
485 coap_add_data(response, 4, (unsigned char *)"done"); in check_async()
487 if (coap_send(ctx, &async->peer, response) == COAP_INVALID_TID) { in check_async()
489 response->hdr->id); in check_async()
491 coap_delete_pdu(response); in check_async()