Revert "move invocation_id check"
authorStefan Metzmacher <metze@samba.org>
Tue, 30 Oct 2012 09:50:26 +0000 (10:50 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 10:31:19 +0000 (11:31 +0100)
This reverts commit 3389503849e22efabe83a9ba8a0b3920e63752e7.

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index dc9bb4f46c553b5ebd47f5d1216d281ce9f72cf8..76b06d8e615c06e156fa5d2327fa1ddd251ced49 100644 (file)
@@ -6981,16 +6981,6 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 
        unix_to_nt_time(&now, t);
 
-       /* get our invocation_id if we have one already attached to the ldb */
-       our_invocation_id = samdb_ntds_invocation_id(ldb);
-       if (!our_invocation_id) {
-               /* this happens during an initial vampire while
-                  updating the schema */
-               DEBUG(0,("No invocationID - replmd_replicated_uptodate_modify\n"));
-               smb_panic(__location__);
-               return replmd_replicated_request_werror(ar, WERR_INTERNAL_ERROR);
-       }
-
        if (ar->search_msg == NULL) {
                /* this happens for a REPL_OBJ call where we are
                   creating the target object by replicating it. The
@@ -7043,6 +7033,16 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
                ni++;
        }
 
+       /* get our invocation_id if we have one already attached to the ldb */
+       our_invocation_id = samdb_ntds_invocation_id(ldb);
+       if (!our_invocation_id) {
+               /* this happens during an initial vampire while
+                  updating the schema */
+               DEBUG(0,("No invocationID - replmd_replicated_uptodate_modify\n"));
+               smb_panic(__location__);
+               return replmd_replicated_request_werror(ar, WERR_INTERNAL_ERROR);
+       }
+
        /* merge in the source_dsa vector is available */
        for (i=0; (ruv && i < ruv->count); i++) {
                found = false;