static struct in_addr *lookup_byname_backend(const char *name, int *count)
{
- int fd = -1;
struct ip_service *address = NULL;
struct in_addr *ret = NULL;
- int j, flags = 0;
+ int j;
if (!initialised) {
nss_wins_init();
return ret;
}
- fd = wins_lookup_open_socket_in();
- if (fd == -1) {
- return NULL;
- }
-
/* uggh, we have to broadcast to each interface in turn */
for (j=iface_count() - 1;j >= 0;j--) {
const struct in_addr *bcast = iface_n_bcast_v4(j);
continue;
}
in_addr_to_sockaddr_storage(&ss, *bcast);
- status = name_query(fd, name, 0x00, True, True, &ss,
- NULL, &pss, count, &flags, NULL);
+ status = name_query(name, 0x00, True, True, &ss,
+ NULL, &pss, count, NULL);
if (pss) {
if ((ret = SMB_MALLOC_P(struct in_addr)) == NULL) {
return NULL;
}
}
- close(fd);
return ret;
}