Fix parsing of GlobalValues as command line options.

This commit is contained in:
Gustavo J. A. M. Carneiro
2008-03-20 15:16:17 +00:00
parent 56299308b6
commit 4ef540a4e6

View File

@@ -243,10 +243,12 @@ CommandLine::HandleArgument (std::string name, std::string value) const
}
}
}
Config::SetGlobalFailSafe (name, String (value));
Config::SetDefaultFailSafe (name, String (value));
std::cerr << "Invalid command-line arguments: --"<<name<<"="<<value<<std::endl;
PrintHelp ();
if (!Config::SetGlobalFailSafe (name, String (value))
&& !Config::SetDefaultFailSafe (name, String (value)))
{
std::cerr << "Invalid command-line arguments: --"<<name<<"="<<value<<std::endl;
PrintHelp ();
}
}
} // namespace ns3