Lines Matching refs:response
612 coap_pdu_t *response; local
630 response = coap_pdu_init(COAP_MESSAGE_CON, 0, 0, COAP_MAX_PDU_SIZE);
631 if (!response) {
638 if (!coap_add_token(response, obs->token_length, obs->token)) {
642 coap_delete_pdu(response);
649 response->hdr->id = coap_new_message_id(context);
652 response->hdr->type = COAP_MESSAGE_NON;
654 response->hdr->type = COAP_MESSAGE_CON;
657 h(context, r, &obs->local_if, &obs->subscriber, NULL, &token, response);
662 if (response->hdr->type == COAP_MESSAGE_CON) {
663 tid = coap_send_confirmed(context, &obs->local_if, &obs->subscriber, response);
666 tid = coap_send(context, &obs->local_if, &obs->subscriber, response);
670 if (COAP_INVALID_TID == tid || response->hdr->type != COAP_MESSAGE_CON)
671 coap_delete_pdu(response);