replmd: simplify and optimise replmd_modify_la_delete
commitecf6e13749f779d6f56c13951e3d48fdcab18820
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 5 Jan 2017 22:00:57 +0000 (6 11:00 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 9 Feb 2017 02:17:16 +0000 (9 03:17 +0100)
tree6cfc9ea55330a6639e66a0b064c125deb99f3362
parent95bc1e0640c6071e451b2a029c91fa18a3db0294
replmd: simplify and optimise replmd_modify_la_delete

With the old binary search, we didn't get a pointer to the found
value, just a yes or no answer as to its existence. That meant we
ended up searching in both directions to find the links to be deleted.
As a consequence we needed to parse out the GUID of every existing
link, even if it wasn't being deleted.

Here we do it in one pass.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/repl_meta_data.c