diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2011-02-26 23:13:49 +0200 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2011-02-27 00:23:18 +0200 |
commit | 1ca2ec1188098c051fe7ab6d44c9b1cd1f802b18 (patch) | |
tree | 284f303a90d8c62f6326b6e98fc8de4f571a4977 /source4/dsdb/repl | |
parent | 05c90d2fa696517612051a8e7c7dc765723e71f5 (diff) | |
download | samba-1ca2ec1188098c051fe7ab6d44c9b1cd1f802b18.tar.gz samba-1ca2ec1188098c051fe7ab6d44c9b1cd1f802b18.tar.bz2 samba-1ca2ec1188098c051fe7ab6d44c9b1cd1f802b18.zip |
s4-drepl: Schedule event to trigger replication rather than calling run_pending_ops directly
Executing dreplsrv_run_pending_ops() directly may cause a segfault
as in case of failure, the _drepl_replica_sync_done_cb() callback
gets called *before* drepl_replica_sync() returns. In such case,
irpc message gets freed twice - once when irpc_send_reply() gets called
and once when drepl_replica_sync() returns
Diffstat (limited to 'source4/dsdb/repl')
-rw-r--r-- | source4/dsdb/repl/drepl_service.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index f4364afeeb..9248c83111 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -324,8 +324,11 @@ static NTSTATUS drepl_replica_sync(struct irpc_message *msg, /* if we got here, everything is OK */ r->out.result = WERR_OK; - /* force execution of scheduled replications */ - dreplsrv_run_pending_ops(service); + /* + * schedule replication event to force + * replication as soon as possible + */ + dreplsrv_periodic_schedule(service, 0); done: return NT_STATUS_OK; |