nwrap: Fix inventarization of IPs when loading hosts
authorMichael Adam <obnox@samba.org>
Thu, 12 Nov 2015 07:34:39 +0000 (08:34 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 13 Nov 2015 08:38:26 +0000 (09:38 +0100)
commitf8d412170466261a5de04e602517c92de00f6218
treedb3ce742dbab332260c5e03dfd754bb637e8167b
parentce496c3baf5b7d99ae8f7d8ad87493b936d56463
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>
src/nss_wrapper.c