# HG changeset patch # User Florian Pose # Date 1344255485 -7200 # Node ID b31f1d261ab846195b96d2182f5a1f22c10c9998 # Parent 35223d2e6e721bdd6f596d8f8fdcd752b3d21478 Fixed AL status code lookup. diff -r 35223d2e6e72 -r b31f1d261ab8 master/fsm_change.c --- a/master/fsm_change.c Mon Jul 23 16:20:40 2012 +0200 +++ b/master/fsm_change.c Mon Aug 06 14:18:05 2012 +0200 @@ -428,14 +428,18 @@ } else { code = EC_READ_U16(datagram->data); for (al_msg = al_status_messages; al_msg->code != 0xffff; al_msg++) { - if (al_msg->code != code) continue; + if (al_msg->code != code) { + continue; + } + EC_SLAVE_ERR(fsm->slave, "AL status message 0x%04X: \"%s\".\n", al_msg->code, al_msg->message); break; } - if (!al_msg->code) + if (al_msg->code == 0xffff) { /* not found in our list. */ EC_SLAVE_ERR(fsm->slave, "Unknown AL status code 0x%04X.\n", code); + } } // acknowledge "old" slave state