Export (0) Print
Expand All

4.1.10.6.15 UpdateUTDandPAS

procedure UpdateUTDandPAS(
  msgReplyV6: DRS_MSG_GETCHGREPLY_V6,
  partialAttrSetEx: PARTIAL_ATTR_VECTOR_V1_EXT,
  nc: DSName)

Informative summary of behavior: If the client has applied all replicated updates in the response message of IDL_DRSGetNCChanges from the server, and if the replication cycle is complete, then the client updates the replUpToDateVector and partialAttributeSet abstract attributes, as specified in the UpdateUTDandPAS procedure. This procedure has the following input parameters.

partialAttrSetAdd: sequence of ATTRTYP
remoteCursor: UPTODATE_CURSOR_V2
localCursor: ReplUpToDateVector
newCursor: ReplUpToDateVector
nc: DSName
i: DWORD
nc := msgReplyV6.pNC^

/* Update partialAttributeSet abstract attribute. */
if (not partialAttrSetEx.cAttrs = 0) then
  partialAttrSetAdd = AbstractPASFromConcretePAS(partialAttrSetEx)
  nc!partialAttributeSet := 
      nc!partialAttributeSet + partialAttrSetAdd
endif

/* Merge replUpToDateVector abstract attribute */
for i := 0 to msgReplyV6.pUpToDateVecSrc^.cNumCursors - 1
  remoteCursor := msgReplyV6.pUpToDateVecSrc^.rgCursors[i]
  localCursor := select one v from nc!replUpToDateVector where
      (v.uuidDsa = remoteCursor.uuidDsa) 
  if (localCursor = null) then
    /* An entry for the server does not exist; add it. */
    newCursor.uuidDsa := remoteCursor.uuidDsa
    newCursor.usnHighPropUpdate := remoteCursor.usnHighPropUpdate
    newCursor.timeLastSyncSuccess := remoteCursor.timeLastSyncSuccess
    nc!replUpToDateVector := nc!replUpToDateVector + {newCursor}
  else
    /* Update existing entry for the server. */
    if (localCursor.usnHighPropUpdate < 
          remoteCursor.usnHighPropUpdate) then
      newCursor.usnHighPropUpdate := remoteCursor.usnHighPropUpdate
      newCursor.timeLastSyncSuccess := 
        remoteCursor.timeLastSyncSuccess
      newCursor.uuidDsa := remoteCursor.uuidDsa
      nc!replUpToDateVector :=
          nc!replUpToDateVector - {localCursor} + {newCursor}
    endif
  endif
endfor

return
 
Show:
© 2014 Microsoft