[ros-dev] New patch for NDIS:config.c

Jerry crashfourit at gmail.com
Mon Jan 23 02:02:13 CET 2006


I noticed that the implimentation of NdisReadConfiguration() is slightly 
off, so I fixed it. The reason why this was so is located in the diff as 
a comment.

Thanks.
-------------- next part --------------
            Index: drivers/net/ndis/ndis/config.c
===================================================================
--- drivers/net/ndis/ndis/config.c      (revision 20999)
+++ drivers/net/ndis/ndis/config.c      (working copy)
@@ -493,8 +493,17 @@
             str.Buffer = (PWCHAR)KeyInformation->Data;

             (*ParameterValue)->ParameterType = ParameterType;
-            *Status = RtlUnicodeStringToInteger(&str, 16, &(*ParameterValue)->ParameterData.IntegerData);
+
+            /*
+                 If ParameterType is NdisParameterInteger then the base of str is decimal.
+                 If ParameterType is NdisParameterHexInteger then the base of str is hexadecimal.
+            */
+            if (ParameterType == NdisParameterInteger)
+               *Status = RtlUnicodeStringToInteger(&str, 10, &(*ParameterValue)->ParameterData.IntegerData);
+            else if (ParameterType == NdisParameterHexInteger)
+               *Status = RtlUnicodeStringToInteger(&str, 16, &(*ParameterValue)->ParameterData.IntegerData);

             ExFreePool(KeyInformation);

             if(*Status != STATUS_SUCCESS)


More information about the Ros-dev mailing list