Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
-
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