]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Pass the correct TokenNumber into a CallbackOnSet notification function. The value...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Feb 2010 03:47:40 +0000 (03:47 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Feb 2010 03:47:40 +0000 (03:47 +0000)
This would not normally cause an issue because the correct notification function was being called.  There is only an issue if the same notification function is being used for multiple tokens, and the notification function needs to use the TokenNumber parameter to determine which token setting caused the callback function to be called.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9980 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/PCD/Pei/Service.c

index ec91699182b176a583572d818efc4f1cddaaad6d..ab3059c7356ad3fbe72db401f4331118aaf07e7f 100644 (file)
@@ -305,7 +305,7 @@ InvokeCallbackOnSet (
   for (Idx = 0; Idx < PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) {\r
     if (CallbackTable[Idx] != NULL) {\r
       CallbackTable[Idx] (Guid,\r
-                          (Guid == NULL)? TokenNumber: ExTokenNumber,\r
+                          (Guid == NULL) ? (TokenNumber + 1) : ExTokenNumber,\r
                           Data,\r
                           Size\r
                           );\r