Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Fixed Bug which leads to use of wrong module settings on config key duplicates #46

Open
wants to merge 2 commits into
base: 1.2
Choose a base branch
from

Conversation

DirkBaumeister
Copy link

I fixed a bug which leaded to use of wrong module settings in the fix states command.

The problem was:
The oxconfig object initializes the module settings in a global array called _aConfigParams. In this array is no mapping to the modules. If the case is present that two module have keys with the exact same name then it happens that one of the modules get the setting of the other module on fix states.

With my changes this bug is resolved.

I did the following:

  • On init all module settings are loaded in an array called aModuleSettings.
  • This array contains two levels: 1) the modules 2) the settings per module
  • Now within each modules iteration in the fixstatescommand the method fixWrongConfigParams on the config object is called.
  • This method puts the correct settings for this module in the array aModuleSettings.
  • Now the module gets the correct settings on fix states and not random ones.

To be honest: This leads to a bad design of the oxconfig object structure because they concat all the params in array without an sublevel of modules.

@ellisv ellisv changed the base branch from master to 1.2 January 16, 2017 14:16
@ellisv ellisv self-assigned this Jan 16, 2017
@ellisv ellisv added the bug label Jan 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants