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 11:25:31 +0000 (12:25 +0100)
commitb996f0a60c05b2bfbf39c2b88cc665c7f7b7909f
tree656836259664da2ec44777fcb706134e8c8f744d
parent07f1bef632af79ff75033e08d3d69937523d40c5
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