Bugzilla – Bug 1485
Setting global properties in config file (raw text) does not have any effect
Last modified: 2012-08-29 11:51:57 UTC
Created attachment 1434 [details] Small example for reproducing the bug When I set a global property like ChecksumEnabled in a config file and load this file by the ConfigStore, the property isn't set in the simulation. For example 'global ChecksumEnabled "true"' does not result in ChecksumEnabled set to true when running the simulation. Default properties like 'default ns3::UdpServer::Port "800"' are working as supposed. Steps to reproduce: 1) Create a file "config.txt" in the working folder with following content: global ChecksumEnabled "true" default ns3::UdpServer::Port "800" 2) Run the attached script (config-store.cc) 3) Examine the contents of "output-attributes.txt" and see that ChecksumEnabled was set to false instead of true. The UdpServer::Port is set to the correct value (which actually differs from the ns3-default) It seems to be a problem with the methods 'void Default (void);' and 'void Global (void);' of RawTextConfig. These methods are called one by one in 'ConfigStore::ConfigureDefaults'. After calling the first method the member attribute 'm_is' is empty and therefore the second method returns without setting any config values. So if you change the sequence of the calls to the two methods (in 'ConfigStore::ConfigureDefaults'), global properties are set as supposed, while default properties aren't set anymore.
Bug closed. ns-3-dev changeset: 800dfb523bfc