Jon Shallow

Results 272 comments of Jon Shallow

There is a pdu wrapper struct (`coap_pdu_t`), with the data containing the contents of the actual pdu that is going to be sent over the wire "as is" pointed to...

I suggest that you compare the contents of `pdu->token - pdu->max_hdr_size` and `new_hdr` before `pdu->token` gets updated. Note that `pdu->used_size` does not include `pdu->max_hdr_size` as it is an offset from...

.. and `pdu->alloc_size` likewise does not include `pdu->max_hdr_size` as it is an offset from `pdu->token`.

> new_hdr = (uint8_t*)coap_realloc_type(COAP_PDU_BUF, pdu->token - pdu->max_hdr_size, new_size + pdu->max_hdr_size, 8 + pdu->used_size + pdu->hdr_size); I would expect this to be ```` new_hdr = (uint8_t*)coap_realloc_type(COAP_PDU_BUF, pdu->token - pdu->max_hdr_size, new_size +...

> This means the application is responsible of keeping track of the original data? In the case of the client, using Block1, the sending of the data is serial and...

Separately, I think you may have found a potential issue with TCP transports as this code you highlight should be using `max_hdr_size`, not `hdr_size`. I will look into this. I...

It is not clear from the information provided so far as to what you are trying to do and hence the issues you are seeing. You refer to 'context' being...

> At the time of sending, I am setting a application context in context->app Do you mean context->app or session->app ? I would expect session->app. Where do you free off...

When using `coap_context_set_block_mode()` and sending a PDU using NON, `coap_send()` sets up a `coap_lg_crcv_t `structure in case there is a large block of data being returned that has to be...

Do you mean that you are calling `coap_context_set_block_mode(ctx, 0)` before sending the NON and then `coap_context_set_block_mode(ctx, COAP_BLOCK_USE_LIBCOAP | COAP_BLOCK_SINGLE_BODY)` before sending a CON? `` If you not expecting any Block...