Lines Matching refs:response
116 * set to the length of the well-known response on return.
990 coap_pdu_t *response;
1013 /* Waiting for the previous unsolicited response to finish */
1023 /* Waiting for the previous blocked unsolicited response to finish */
1032 /* initialize response */
1033 response = coap_pdu_init(COAP_MESSAGE_CON, 0, 0, coap_session_max_pdu_size(obs->session));
1034 if (!response) {
1043 if (!coap_add_token(response, obs->pdu->actual_token.length,
1050 coap_delete_pdu(response);
1054 obs->pdu->mid = response->mid = coap_new_message_id(obs->session);
1060 response->type = COAP_MESSAGE_NON;
1062 response->type = COAP_MESSAGE_CON;
1067 coap_add_option_internal(response, COAP_OPTION_OBSERVE,
1074 coap_add_option_internal(response, COAP_OPTION_BLOCK2,
1085 coap_add_option_internal(response, COAP_OPTION_Q_BLOCK2,
1103 h(r, obs->session, obs->pdu, query, response);
1105 coap_check_code_lg_xmit(obs->session, obs->pdu, response, r, query);
1107 if (COAP_RESPONSE_CLASS(response->code) != 2) {
1108 coap_remove_option(response, COAP_OPTION_OBSERVE);
1110 if (COAP_RESPONSE_CLASS(response->code) > 2) {
1118 response->type = COAP_MESSAGE_NON;
1119 response->code = COAP_RESPONSE_CODE(404);
1124 if (response->type == COAP_MESSAGE_CON ||
1132 if (response->code == COAP_RESPONSE_CODE(205) &&
1133 coap_get_block_b(obs->session, response, COAP_OPTION_Q_BLOCK2,
1138 block, response, 1);
1144 mid = coap_send_internal(obs_session, response);