Open zhangjinus opened 1 year ago
When you initiate a send, then link status gets set to ISOTP_SEND_STATUS_INPROGRESS. This never changes unless it fails (ERROR) or completes (IDLE).
So not sure where you see a problem.
There is a check before:
if (ISOTP_SEND_STATUS_INPROGRESS == link->send_status) {
isotp_user_debug("Abort previous message, transmission in progress.\n");
return ISOTP_RET_INPROGRESS;
}
when sending multi-frame, tp_poll handle remain packets. but in isotp_send_with_id function,send_bs_remain set to 0, causing tp_poll can not do sending. link->send_status will stay in ISOTP_SEND_STATUS_INPROGRESS. / send multi-frame / ret = isotp_send_first_frame(link, id); if (ISOTP_RET_OK == ret) { link->send_bs_remain = 0; link->send_st_min = 0; link->send_wtf_count = 0; link->send_timer_st = link->isotp_user_get_ms(); link->send_timer_bs = link->isotp_user_get_ms() + ISO_TP_DEFAULT_RESPONSE_TIMEOUT; link->send_protocol_result = ISOTP_PROTOCOL_RESULT_OK; link->send_status = ISOTP_SEND_STATUS_INPROGRESS; } .... void isotp_poll(IsoTpLink *link) { int ret;
......