Skip to content

Commit

Permalink
Merge pull request #334 from pwieczorkiewicz/no-persistent
Browse files Browse the repository at this point in the history
Set client-info and client-state earlier, do not auto detect persistance
  • Loading branch information
mtomaschewski committed Jul 22, 2014
2 parents 788d36f + 25560e1 commit 6aa00b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/fsm.c
Expand Up @@ -1163,15 +1163,15 @@ ni_ifworker_set_state(ni_ifworker_t *w, unsigned int new_state)
if (w->fsm.wait_for && w->fsm.wait_for->next_state == new_state)
w->fsm.wait_for = NULL;

if (w->target_state == new_state) {
if (w->object && !w->readonly) {
if (prev_state < new_state)
ni_ifworker_update_client_state(w);
if (new_state != NI_FSM_STATE_DEVICE_DOWN)
ni_ifworker_update_client_info(w);
}
ni_ifworker_success(w);
if (new_state == NI_FSM_STATE_DEVICE_READY &&
w->object && !w->readonly) {
if (prev_state < new_state)
ni_ifworker_update_client_state(w);
ni_ifworker_update_client_info(w);
}

if (w->target_state == new_state)
ni_ifworker_success(w);
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/netdev.c
Expand Up @@ -601,8 +601,6 @@ ni_netdev_discover_client_state(ni_netdev_t *dev)
state = NI_FSM_STATE_LINK_UP;

cs = ni_client_state_new(state);
NI_CLIENT_STATE_SET_CONTROL_FLAG(cs->persistent,
state >= NI_FSM_STATE_LINK_UP, TRUE);

ni_netdev_set_client_state(dev, cs);
}
Expand Down

0 comments on commit 6aa00b9

Please sign in to comment.