diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs index ebc07b6a..8ba0173e 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs @@ -215,7 +215,7 @@ namespace LwipMibCompiler private static SnmpTreeNode GenerateSnmpTreeNode(MibTreeNode mibTreeNode, SnmpTreeNode parentNode) { SnmpTreeNode result = new SnmpTreeNode(parentNode); - result.Name = _alphaNumericRegex.Replace(mibTreeNode.Entity.Name, "").ToLowerInvariant(); + result.Name = _alphaNumericRegex.Replace (mibTreeNode.Entity.Name, ""); result.Oid = mibTreeNode.Entity.Value; result.FullOid = MibTypesResolver.ResolveOid(mibTreeNode.Entity).GetOidString(); @@ -337,7 +337,7 @@ namespace LwipMibCompiler } } - result.Name = _alphaNumericRegex.Replace(ote.Name, "").ToLowerInvariant(); + result.Name = _alphaNumericRegex.Replace(ote.Name, ""); result.Oid = ote.Value; if (ote.Access == MaxAccess.readWrite) diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs index e54aa343..f113b242 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs @@ -53,7 +53,7 @@ namespace LwipSnmpCodeGeneration public override string FullNodeName { - get { return this.Name + "_root"; } + get { return this.Name.ToLowerInvariant() + "_root"; } } public override void GenerateCode(MibCFile mibFile) @@ -73,7 +73,7 @@ namespace LwipSnmpCodeGeneration boidInitialization.Append("}"); VariableDeclaration boidDecl = new VariableDeclaration( - new VariableType(this.Name + "_base_oid", LwipDefs.Vt_U32, null, ConstType.Value, String.Empty), + new VariableType(this.Name.ToLowerInvariant() + "_base_oid", LwipDefs.Vt_U32, null, ConstType.Value, String.Empty), boidInitialization.ToString(), true); mibFile.Declarations.Add(boidDecl); diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs index 3d66492b..086fbb9f 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs @@ -49,7 +49,7 @@ namespace LwipSnmpCodeGeneration public override string FullNodeName { - get { return this.Name + "_scalars"; } + get { return this.Name.ToLowerInvariant() + "_scalars"; } } protected override IEnumerable AggregatedScalarNodes diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs index c37af466..3298ae9b 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs @@ -57,7 +57,7 @@ namespace LwipSnmpCodeGeneration public override string FullNodeName { - get { return this.Name + "_scalar"; } + get { return this.Name.ToLowerInvariant() + "_scalar"; } } public SnmpDataType DataType diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs index b53c0be9..bf0c604e 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs @@ -50,7 +50,7 @@ namespace LwipSnmpCodeGeneration public override string FullNodeName { - get { return this.Name + "_treenode"; } + get { return this.Name.ToLowerInvariant() + "_treenode"; } } public string FullOid @@ -119,7 +119,7 @@ namespace LwipSnmpCodeGeneration } VariableDeclaration subnodeArray = new VariableDeclaration( - new VariableType(this.Name + "_subnodes", LwipDefs.Vt_StNode, "*", ConstType.Both, String.Empty), + new VariableType(this.Name.ToLowerInvariant() + "_subnodes", LwipDefs.Vt_StNode, "*", ConstType.Both, String.Empty), "{\n" + subnodeArrayInitialization + "\n}", isStatic: true);