fsm.c: bugfix, exposed by link down/up in wr-switch
Commit d2b2c636 introduced a caching of the current state structure. The "current" structure, as long as not null, is considered valid. arch-wrs, just sets ppi->state to initializing on link-up, without clearing the cached pointer, so fsm.c was using the old pointer, resulting in use of closed file descriptors, as no init was performed. This doesn't apply to change from withing the states themselves, as fsm.c manages the state change. As a side effect, now that we check the state numberm there's no need to zero the pointer on state leave. (And while a it another trivial detail...). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Showing
Please
register
or
sign in
to comment