menuselect: Resolve infinite loop in dependency scenario.

Given a scenario where a module has a dependency on both
an external library and a module if the external library was
available and the module was not an infinite loop would
occur. This happened due to the code changing the dependecy
status to no failure on each dependency checking loop
iteration, resulting in the code thinking that it had
gone from no failure to failure each time triggering another
dependency check.

This change makes it so that the old dependency status is
preserved throughout the dependency checking allowing it to
determine that after the first iteration the dependency
status does not transition from no failure to failure.

ASTERISK-28930

Change-Id: Iea06d45d9fd6d8bfd068882a0bb7e23a53ec3e84
This commit is contained in:
Joshua C. Colp
2020-06-24 07:25:47 -03:00
committed by Friendly Automation
parent a423f935c9
commit 9b5042433b
2 changed files with 8 additions and 6 deletions

View File

@@ -78,6 +78,8 @@ struct member {
unsigned int was_enabled:1;
/*! This module has failed dependencies */
unsigned int depsfailed:2;
/*! Previous failed dependencies when calculating */
unsigned int depsfailedold:2;
/*! This module has failed conflicts */
unsigned int conflictsfailed:2;
/*! This module's 'enabled' flag was changed by a default only */