LwipMibCompiler: Don't generate empty root nodes

This commit is contained in:
Dirk Ziegelmeier 2016-03-14 12:13:24 +01:00
parent dc98e31e4d
commit 90bc1da434

View File

@ -126,9 +126,12 @@ namespace LwipMibCompiler
// let the tree transform itself depending on node structure
snmpMib.Analyze();
// generate code from LWIP object tree
Console.WriteLine(" Generating code " + snmpMib.Name);
snmpMib.Generate(generatedFile, generatedHeaderFile);
if (snmpMib.ChildNodes.Count != 0)
{
// generate code from LWIP object tree
Console.WriteLine(" Generating code " + snmpMib.Name);
snmpMib.Generate(generatedFile, generatedHeaderFile);
}
}
string preservedCode = MibCFile.GetPreservedCode(destFile);