smbd: Avoid some talloc_realloc in notify_internal
commit032da72e2b81685f292622cfd2ced14af257849d
authorVolker Lendecke <vl@samba.org>
Wed, 31 Oct 2012 12:02:19 +0000 (31 13:02 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Mar 2013 10:22:16 +0000 (26 11:22 +0100)
tree9e8333fd1f5fdae8058dff4984a09dfa82e2606b
parentc2b26a43ffae22c9dff7929c48531fec9e6ed922
smbd: Avoid some talloc_realloc in notify_internal

For the nonclustered case we will only ever have one vnn in notify_index.tdb.
For this case, without this patch we did talloc_realloc when collecting vnns to
be able to do the memcpy instead of explicit copy with a for-loop. This new
code will partition the new vnns we see when parsing a notify_index.tdb record
into ourselves and all foreign vnns, only really collecting the foreign ones in
an array.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/notify_internal.c