mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
Merge branch 'bugfix/enlarge_coap_server_pdu' into 'master'
fix: response failed when set a large response data See merge request idf/esp-idf!2627
This commit is contained in:
@@ -51,8 +51,7 @@ send_async_response(coap_context_t *ctx, const coap_endpoint_t *local_if)
|
||||
coap_pdu_t *response;
|
||||
unsigned char buf[3];
|
||||
const char* response_data = "Hello World!";
|
||||
size_t size = sizeof(coap_hdr_t) + 20;
|
||||
response = coap_pdu_init(async->flags & COAP_MESSAGE_CON, COAP_RESPONSE_CODE(205), 0, size);
|
||||
response = coap_pdu_init(async->flags & COAP_MESSAGE_CON, COAP_RESPONSE_CODE(205), 0, COAP_MAX_PDU_SIZE);
|
||||
response->hdr->id = coap_new_message_id(ctx);
|
||||
if (async->tokenlen)
|
||||
coap_add_token(response, async->tokenlen, async->token);
|
||||
|
Reference in New Issue
Block a user