getncchanges.c: Refactor to track more state using repl_chunk
authorGarming Sam <garming@catalyst.net.nz>
Tue, 8 Aug 2017 04:27:18 +0000 (16:27 +1200)
committerGarming Sam <garming@samba.org>
Mon, 18 Sep 2017 03:51:25 +0000 (05:51 +0200)
commit7ba10844d1b4c8c1d08c62353150dc03ee166150
tree700ff76350eb719032e92a749415496eba0f6de0
parent10df9f6bfd04af08d095b6796f902888f1172b9f
getncchanges.c: Refactor to track more state using repl_chunk

To prepare GET_TGT to deal with a large number of links better, there
is now a 'repl_chunk' struct to help keep track of all the factors
relating to the current chunk of replication data (i.e. how many
objects/links we can send and how many we've already processed). This
means we can have a consistent way of working out whether the current
chunk is full (whether that be due to objects, links, or just too much
time taken).

This patch should not alter functionality. This is just a refactor to
add the basic framework, which will be used in the next patch.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/rpc_server/drsuapi/getncchanges.c