Commit 8c1136fe authored by Alessandro Rubini's avatar Alessandro Rubini

fsm: better error for state failure

This adds the interface name where the error happened (we'll need it
for multi-link setups, that Aurelio is going to implement soon).

Moreover, this kills the last pp_diag_error call
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent c1ec94a7
......@@ -102,7 +102,8 @@ int pp_state_machine(struct pp_instance *ppi, uint8_t *packet, int plen)
pp_diag_fsm(ppi, ip->name, STATE_ENTER, plen);
err = ip->f1(ppi, packet, plen);
if (err)
pp_diag_error(ppi, err);
pp_printf("fsm for %s: Error %i in %s\n",
OPTS(ppi)->iface_name, err, ip->name);
/* done: if new state mark it, and enter it now (0 ms) */
if (ppi->state != ppi->next_state) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment