I think there is a possible data corruption possibility in the response sending code here:
|
int err = thingset_can_send_inst(ts_can, sbuf->data, tx_len, target_addr, route, |
|
NULL, NULL, K_NO_WAIT); |
|
if (err != 0) { |
|
k_sem_give(&sbuf->lock); |
|
} |
The semaphore will be released bevore the transmission is completed, which may take some time in case of a large reply.
I think the semaphore shall be released in a sent callback handler instead of right after the transmission has been initialized.
might be related to #57
I think there is a possible data corruption possibility in the response sending code here:
thingset-zephyr-sdk/src/can.c
Lines 537 to 541 in 425cfce
The semaphore will be released bevore the transmission is completed, which may take some time in case of a large reply.
I think the semaphore shall be released in a sent callback handler instead of right after the transmission has been initialized.
might be related to #57