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 | 778f5f77a66cda76348a7c6f64cd63afe2bfe077 (patch) | |
tree | 3791b1e7b10b3f5aaa1b8d6680af429530d7923f /source/nmbd/nmbd_subnetdb.c | |
parent | 042b9e3a6332473dc88c36dd7f99428644324ac4 (diff) | |
download | samba-778f5f77a66cda76348a7c6f64cd63afe2bfe077.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);
Diffstat (limited to 'source/nmbd/nmbd_subnetdb.c')
-rw-r--r-- | source/nmbd/nmbd_subnetdb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c index ebb6bfa9c6b..3b450f67124 100644 --- a/source/nmbd/nmbd_subnetdb.c +++ b/source/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; |