Skip to content

Commit

Permalink
fsm: Resolve devices hierarchy before marking
Browse files Browse the repository at this point in the history
  • Loading branch information
wipawel committed Jun 3, 2014
1 parent 1bb4b6c commit e0a4239
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/fsm.c
Expand Up @@ -1991,6 +1991,11 @@ ni_fsm_mark_matching_workers(ni_fsm_t *fsm, ni_ifworker_array_t *marked, const n

ni_ifworkers_check_loops(fsm, marked);

/* Collect all workers in the device graph, and sort them
* by increasing depth.
*/
ni_ifworkers_flatten(marked);

/* Mark all our primary devices with the requested marker values */
for (i = 0; i < marked->count; ++i) {
ni_ifworker_t *w = marked->data[i];
Expand All @@ -2011,11 +2016,6 @@ ni_fsm_start_matching_workers(ni_fsm_t *fsm, ni_ifworker_array_t *marked)
{
unsigned int i, count = 0;

/* Collect all workers in the device graph, and sort them
* by increasing depth.
*/
ni_ifworkers_flatten(marked);

for (i = 0; i < marked->count; ++i) {
ni_ifworker_t *w = marked->data[i];
int rv;
Expand Down

0 comments on commit e0a4239

Please sign in to comment.