Implement HOSTADDRESS and HOSTADDRESS6 macros.

This commit is contained in:
Gunnar Beutner 2013-07-02 09:47:31 +02:00
parent bf58700c10
commit 4cd4228f64
1 changed files with 12 additions and 3 deletions

View File

@ -610,9 +610,18 @@ bool Host::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *res
Dictionary::Ptr macros = GetMacros();
if (macros && macros->Contains(macro)) {
*result = macros->Get(macro);
return true;
if (macros) {
String name = macro;
if (name == "HOSTADDRESS")
name = "address";
else if (macro == "HOSTADDRESS6")
name = "address6";
if (macros->Contains(name)) {
*result = macros->Get(name);
return true;
}
}
return false;