Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. rpcinit.c
  5. Abstract:
  6. DSROLE - RPC Server Initialization
  7. Author:
  8. Scott Birrell (ScottBi) April 29, 1991
  9. Mac McLain (MacM) April 14, 1997 - Copied from lsa\server
  10. Environment:
  11. Revision History:
  12. --*/
  13. #include <setpch.h>
  14. #include <dssetp.h>
  15. #include <dssetrpc.h>
  16. #include "ds.h"
  17. #include "ophandle.h"
  18. VOID DSROLER_HANDLE_rundown(
  19. DSROLER_HANDLE LsaHandle
  20. )
  21. /*++
  22. Routine Description:
  23. This routine is called by the server RPC runtime to run down a
  24. Context Handle.
  25. Arguments:
  26. None.
  27. Return Value:
  28. --*/
  29. {
  30. }
  31. VOID
  32. DSROLER_IFM_HANDLE_rundown(
  33. DSROLER_IFM_HANDLE IfmHandle
  34. )
  35. {
  36. BOOL fLostRace;
  37. fLostRace = InterlockedCompareExchange(&(DsRolepCurrentIfmOperationHandle.fIfmOpHandleLock),
  38. TRUE,
  39. FALSE);
  40. if (fLostRace ||
  41. (DsRolepCurrentOperationHandle.OperationState != DSROLEP_IDLE)) {
  42. // Not safe to try to clean up here, but we've either lost the
  43. // race, or dcpromo is in the middle of consuming the IFM args.
  44. return;
  45. }
  46. DsRolepCurrentIfmOperationHandle.fIfmSystemInfoSet = FALSE;
  47. DsRolepClearIfmParams();
  48. DsRolepCurrentIfmOperationHandle.fIfmOpHandleLock = FALSE;
  49. }