From ff2e062a08e19149f498bbee0c9feb4f2991a9c6 Mon Sep 17 00:00:00 2001 From: Knud Baastrup Date: Fri, 10 Jul 2015 12:46:37 +0200 Subject: [PATCH] Applied base-0026-EoE-processing-is-now-only-allowed-in-state-PREOP EoE is disabled in INIT, BOOT, and invalid states to prevent errors. --- master/master.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/master/master.c b/master/master.c index 52db0400..0bf44ddb 100644 --- a/master/master.c +++ b/master/master.c @@ -1901,12 +1901,16 @@ static int ec_master_eoe_thread(void *priv_data) // actual EoE processing sth_to_send = 0; list_for_each_entry(eoe, &master->eoe_handlers, list) { - ec_eoe_run(eoe); - if (eoe->queue_datagram) { - sth_to_send = 1; - } - if (!ec_eoe_is_idle(eoe)) { - all_idle = 0; + if ((eoe->slave->current_state == EC_SLAVE_STATE_PREOP) || + (eoe->slave->current_state == EC_SLAVE_STATE_SAFEOP) || + (eoe->slave->current_state == EC_SLAVE_STATE_OP)) { + ec_eoe_run(eoe); + if (eoe->queue_datagram) { + sth_to_send = 1; + } + if (!ec_eoe_is_idle(eoe)) { + all_idle = 0; + } } }