summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-09-08 01:07:44 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-09 18:26:51 +0300
commit3593298c7e095b0935bffe05e3b1e190abf91707 (patch)
tree99805808c280581b20848445b53c70c14503509e
parent7ee34182dffdf497bdad5a1e155bc2ca80d71111 (diff)
downloadsamba-3593298c7e095b0935bffe05e3b1e190abf91707.tar.gz
samba-3593298c7e095b0935bffe05e3b1e190abf91707.tar.bz2
samba-3593298c7e095b0935bffe05e3b1e190abf91707.zip
s4-dreplsrv: Call dreplsrv_out_operation::callback in case we fail to even run the operation
Operation was scheduled already, so we need to call the callback function for it to be able to do its job. For instance, if we are blocking an rpc call until an operation is completed and there is no memory, then client will be blocked without knowing what is going on with the server.
-rw-r--r--source4/dsdb/repl/drepl_out_pull.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/repl/drepl_out_pull.c b/source4/dsdb/repl/drepl_out_pull.c
index a4a00b48e7..21f986ad7b 100644
--- a/source4/dsdb/repl/drepl_out_pull.c
+++ b/source4/dsdb/repl/drepl_out_pull.c
@@ -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)),