Separate main state
authornorly <ny-git@enpas.org>
Sun, 19 Mar 2017 11:29:43 +0000 (12:29 +0100)
committernorly <ny-git@enpas.org>
Sun, 19 Mar 2017 11:29:43 +0000 (12:29 +0100)
vw-nm.c

diff --git a/vw-nm.c b/vw-nm.c
index 16631ad247fcb598157c5695d76a467777f03db0..e5872a7860c4168a0902d498c8ec0b172e10c61c 100644 (file)
--- a/vw-nm.c
+++ b/vw-nm.c
@@ -81,7 +81,8 @@ static void nm_handle_can_frame(struct NM_Main *nm, struct can_frame *frame)
        /* If we're currently stuck in Limp Home mode, and we can see
         * someone else's messages: reset counters, reset NM, re-login.
         */
-       if (nm->nodes[nm->my_id].state == NM_MAIN_LIMPHOME) {
+       if ((nm->nodes[nm->my_id].state & NM_MAIN_MASK)
+               == NM_MAIN_LIMPHOME) {
                nm_initreset(nm);
                return;
        }