diff options
author | Tim Potter <tpot@samba.org> | 2001-11-26 03:11:44 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-11-26 03:11:44 +0000 |
commit | 585d0efbc6428e5876d354fee49c241c1bad809d (patch) | |
tree | 48ef6538dc6855f6084a63fde1097032cc9e2ebc /source3/nmbd/nmbd_subnetdb.c | |
parent | 8b7434b2a0b8d138cd83e4feeecb9127d729c437 (diff) | |
download | samba-585d0efbc6428e5876d354fee49c241c1bad809d.tar.gz |
Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:
void zero_ip(struct in_adder *ip);
BOOL is_zero_ip(struct in_addr ip);
(This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
Diffstat (limited to 'source3/nmbd/nmbd_subnetdb.c')
-rw-r--r-- | source3/nmbd/nmbd_subnetdb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c index ebb6bfa9c6b..3b450f67124 100644 --- a/source3/nmbd/nmbd_subnetdb.c +++ b/source3/nmbd/nmbd_subnetdb.c @@ -33,7 +33,6 @@ extern int global_nmb_port; extern fstring myworkgroup; extern char **my_netbios_names; -extern struct in_addr ipzero; /* This is the broadcast subnets database. */ struct subnet_record *subnetlist = NULL; @@ -232,7 +231,7 @@ BOOL create_subnets(void) { int num_interfaces = iface_count(); int i; - struct in_addr unicast_ip; + struct in_addr unicast_ip, ipzero; extern struct in_addr loopback_ip; if(num_interfaces == 0) @@ -280,7 +279,7 @@ BOOL create_subnets(void) struct in_addr real_wins_ip; real_wins_ip = wins_srv_ip(); - if (!zero_ip(real_wins_ip)) + if (!is_zero_ip(real_wins_ip)) { unicast_ip = real_wins_ip; } @@ -302,7 +301,7 @@ BOOL create_subnets(void) { /* We should not be using a WINS server at all. Set the ip address of the subnet to be zero. */ - unicast_ip = ipzero; + zero_ip(&unicast_ip); } /* @@ -315,6 +314,8 @@ BOOL create_subnets(void) unicast_subnet = make_subnet( "UNICAST_SUBNET", UNICAST_SUBNET, unicast_ip, unicast_ip, unicast_ip); + zero_ip(&ipzero); + remote_broadcast_subnet = make_subnet( "REMOTE_BROADCAST_SUBNET", REMOTE_BROADCAST_SUBNET, ipzero, ipzero, ipzero); @@ -347,7 +348,7 @@ BOOL we_are_a_wins_client(void) static int cache_we_are_a_wins_client = -1; if(cache_we_are_a_wins_client == -1) - cache_we_are_a_wins_client = (ip_equal(ipzero, unicast_subnet->myip) ? + cache_we_are_a_wins_client = (is_zero_ip(unicast_subnet->myip) ? False : True); return cache_we_are_a_wins_client; |