s4-dreplsrv: Call dreplsrv_out_operation::callback in case we fail to even run the...
[mat/samba.git] / source4 / dsdb / repl / drepl_out_pull.c
index a4a00b48e7449d0fbdfef8050050b69dbe61062e..21f986ad7b41e5d178866a36a2f658b17c040cdb 100644 (file)
@@ -163,6 +163,14 @@ void dreplsrv_run_pending_ops(struct dreplsrv_service *s)
                rf->consecutive_sync_failures++;
                s->ops.current = NULL;
 
+               /*
+                * call the callback (if any) so it gets the chance
+                * to do its job just like in any other failure situation
+                */
+               if (op->callback) {
+                       op->callback(s, rf->result_last_attempt, op->extended_ret, op->cb_data);
+               }
+
                DEBUG(1,("dreplsrv_op_pull_source(%s/%s) failures[%u]\n",
                        win_errstr(rf->result_last_attempt),
                        nt_errstr(werror_to_ntstatus(rf->result_last_attempt)),