nwrap: Fix inventarization of IPs when loading hosts
authorMichael Adam <obnox@samba.org>
Thu, 12 Nov 2015 07:34:39 +0000 (08:34 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 08:59:27 +0000 (09:59 +0100)
commit0ccc207e9381b322872226f0633d947a5dc9049b
tree06ee29aaa798574549ffab9524080aaf4aa72d60
parenta81490b1977031d63872929df8a830e52b591240
nwrap: Fix inventarization of IPs when loading hosts

Use nwrap_ed_inventarize() instead of nwrap_add_ai().

This not only removes code duplication, but also
more correctly adds more than one line for a given
IP address in a list behind this address.

The original code would only have inventarized
the first line for an IP found.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/nss_wrapper/nss_wrapper.c