Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

5.200 UpdateRefs

 procedure UpdateRefs(DRS_MSG_UPDREFS_V1 msgIn): ULONG

The UpdateRefs method implements the core functionality of IDL_DRSUpdateRefs,  that is, adds or deletes a value from the repsTo of a specified NC replica.

 err: DWORD
 nc: DSName
 rt: RepsTo
 nc := msgIn.pNC^
  
 /* If ulOptions contains DRS_ASYNC_OP, the server processes the request asynchronously.
 if DRS_ASYNC_OP in msgIn.ulOptions then
   Asynchronous Processing: Initiate a logical thread of control
    to process the remainder of this request asynchronously
   return ERROR_SUCCESS
 endif
  
 /*  If DRS_DEL_REF is specified, the return value is that associated with the DRS_DEL_REF
 if DRS_DEL_REF in msgIn.ulOptions then
   rt := select one v from nc!repsTo where
       (v.naDsa = msgIn.pszDsaDest or
         v.uuidDsa = msgIn.uuidDsaObjDest)
   if rt = null then
     err := ERROR_DS_DRA_REF_NOT_FOUND
   else
     nc!repsTo := nc!repsTo - {rt}
     err := ERROR_SUCCESS
   endif
 endif
  
 /* If DRS_DEL_REF and DRS_ADD_REF are both specified, the return
  * value is that associated with the DRS_ADD_REF. */
 if DRS_ADD_REF in msgIn.ulOptions then
   rt := select one v from nc!repsTo where
       (v.naDsa = msgIn.pszDsaDest or
         v.uuidDsa = msgIn.uuidDsaObjDest)
   if rt = null then
     rt.naDsa := msgIn.pszDsaDest
     rt.uuidDsa := msgIn.uuidDsaObjDest
     rt.options := msgIn.ulOptions ∩ {DRS_WRIT_REP}
     rt.timeLastAttempt := 0
     rt.timeLastSuccess := current time
     rt.consecutiveFailures := 0
     rt.resultLastAttempt := 0
     nc!repsTo := nc!repsTo + {rt}
     err := ERROR_SUCCESS
   else
     err := ERROR_DS_DRA_REF_ALREADY_EXISTS
   endif
 endif 
 return err
Show:
© 2015 Microsoft