summaryrefslogtreecommitdiffstats
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2000-10-11 15:54:17 +0000
committerChristopher R. Hertel <crh@samba.org>2000-10-11 15:54:17 +0000
commit9a872fb616e54a8cee07963ec318a7939f3794af (patch)
treebde6c4b677c9639b58d876e9ec09ba90164948a2 /source3/nsswitch
parentfbe838f69bdcaf1ac46a2ab3367af8c7f066177c (diff)
downloadsamba-9a872fb616e54a8cee07963ec318a7939f3794af.tar.gz
samba-9a872fb616e54a8cee07963ec318a7939f3794af.tar.xz
samba-9a872fb616e54a8cee07963ec318a7939f3794af.zip
Converted to call lib/wins_srv.c:wins_srv_ip() instead of lp_wins_server()
when looking up the WINS server address. Please *don't* use lp_wins_server() any more! The wins_srv_ip() function has the following features: - If the WINS server was entered as a DNS name then the translation to an IP address will already have taken place. We used to do this every time a call to the WINS server was made. Ick. - The return value of wins_srv_ip() is a struct in_addr. Ready to go. - When WINS failover is fully implemented, you'll be able to enter a colon- separated list of WINS servers via the WINS SERVER parameter. Using lp_wins_server() directly will fail if this syntax is used. Chris -)----- (This used to be commit 56be7c2a49a8a918318a70843fff4e89ec10d0d3)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wins.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c
index 6fbaedcdea1..be76c2e54ee 100644
--- a/source3/nsswitch/wins.c
+++ b/source3/nsswitch/wins.c
@@ -36,7 +36,7 @@ struct in_addr *lookup_backend(const char *name, int *count)
int fd;
static int initialised;
struct in_addr *ret;
- char *p;
+ struct in_addr p;
int j;
if (!initialised) {
@@ -63,9 +63,9 @@ struct in_addr *lookup_backend(const char *name, int *count)
* goto out;
* }
*/
- p = lp_wins_server();
- if (p && *p) {
- ret = name_query(fd,name,0x20,False,True, *interpret_addr2(p), count);
+ p = wins_srv_ip();
+ if( !zero_ip(p) ) {
+ ret = name_query(fd,name,0x20,False,True, p, count);
goto out;
}