Fix return value for ecrt_master_send_ext().

This commit is contained in:
Bjarne von Horn
2024-06-06 13:55:40 +02:00
parent 3a064cac2a
commit 495dbc1aa6
2 changed files with 2 additions and 1 deletions

View File

@@ -1110,6 +1110,7 @@ EC_PUBLIC_API int ecrt_master_receive(
* This method has to be called in the send callback function passed via
* ecrt_master_callbacks() to allow the sending of non-application datagrams.
* \return Zero on success, otherwise negative error code.
* \retval -EAGAIN Lock could not be acquired, try again later.
*/
int ecrt_master_send_ext(
ec_master_t *master /**< EtherCAT master. */

View File

@@ -2534,7 +2534,7 @@ int ecrt_master_send_ext(ec_master_t *master)
ec_datagram_t *datagram, *next;
if (down_trylock(&master->ext_queue_sem))
return;
return -EAGAIN;
list_for_each_entry_safe(datagram, next, &master->ext_datagram_queue,
ext_queue) {