summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/wins.c
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2000-10-09 21:44:00 +0000
committerJohn Terpstra <jht@samba.org>2000-10-09 21:44:00 +0000
commit3fb2e94c4430c570639c0e4d1caeed3a19bbd09b (patch)
tree119277683543c706d6d029f95d0124bff0216c1b /source/nsswitch/wins.c
parent044246fe7e40d83673120dc14b5d6572e6c23142 (diff)
downloadsamba-3fb2e94c4430c570639c0e4d1caeed3a19bbd09b.tar.gz
samba-3fb2e94c4430c570639c0e4d1caeed3a19bbd09b.tar.xz
samba-3fb2e94c4430c570639c0e4d1caeed3a19bbd09b.zip
Fixes to allow wins.c to compile to allow building of libnss_wins.so.
Diffstat (limited to 'source/nsswitch/wins.c')
-rw-r--r--source/nsswitch/wins.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c
index ca0f22e3a66..6fbaedcdea1 100644
--- a/source/nsswitch/wins.c
+++ b/source/nsswitch/wins.c
@@ -36,6 +36,7 @@ struct in_addr *lookup_backend(const char *name, int *count)
int fd;
static int initialised;
struct in_addr *ret;
+ char *p;
int j;
if (!initialised) {
@@ -55,8 +56,16 @@ struct in_addr *lookup_backend(const char *name, int *count)
set_socket_options(fd,"SO_BROADCAST");
- if( !zero_ip( wins_ip ) ) {
- ret = name_query( fd, name, 0x20, False, True, wins_src_ip(), count );
+/* The next four lines commented out by JHT
+ and replaced with the four lines following */
+/* if( !zero_ip( wins_ip ) ) {
+ * ret = name_query( fd, name, 0x20, False, True, wins_src_ip(), count );
+ * goto out;
+ * }
+ */
+ p = lp_wins_server();
+ if (p && *p) {
+ ret = name_query(fd,name,0x20,False,True, *interpret_addr2(p), count);
goto out;
}