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
/* 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;