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/client | |
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/client')
-rw-r--r-- | source/client/client.c | 12 | ||||
-rw-r--r-- | source/client/smbmount.c | 7 | ||||
-rw-r--r-- | source/client/smbspool.c | 3 |
3 files changed, 8 insertions, 14 deletions
diff --git a/source/client/client.c b/source/client/client.c index c684f3fea69..2b0867cf7b4 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -45,7 +45,6 @@ static char *cmdstr; static BOOL got_pass; static int io_bufsize = 64512; static BOOL use_kerberos; -extern struct in_addr ipzero; static int name_type = 0x20; static int max_protocol = PROTOCOL_NT1; @@ -2085,7 +2084,6 @@ struct cli_state *do_connect(const char *server, const char *share) struct nmb_name called, calling; const char *server_n; struct in_addr ip; - extern struct in_addr ipzero; fstring servicename; char *sharename; @@ -2102,13 +2100,13 @@ struct cli_state *do_connect(const char *server, const char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , server, name_type); again: - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -2366,12 +2364,12 @@ static int do_message_op(void) struct in_addr ip; struct nmb_name called, calling; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , desthost, name_type); - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) != port) || !cli_connect(cli, desthost, &ip)) { @@ -2584,7 +2582,7 @@ static int do_message_op(void) case 'I': { dest_ip = *interpret_addr2(optarg); - if (zero_ip(dest_ip)) + if (is_zero_ip(dest_ip)) exit(1); have_ip = True; } diff --git a/source/client/smbmount.c b/source/client/smbmount.c index d929599e56d..3aeddfabca1 100644 --- a/source/client/smbmount.c +++ b/source/client/smbmount.c @@ -27,8 +27,6 @@ #include <asm/types.h> #include <linux/smb_fs.h> -extern struct in_addr ipzero; - extern BOOL in_client; extern pstring user_socket_options; extern BOOL append_log; @@ -119,7 +117,6 @@ static struct cli_state *do_connection(char *the_service) struct nmb_name called, calling; char *server_n; struct in_addr ip; - extern struct in_addr ipzero; pstring server; char *share; @@ -143,7 +140,7 @@ static struct cli_state *do_connection(char *the_service) make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -756,7 +753,7 @@ static void parse_mount_smb(int argc, char **argv) DEBUGLEVEL = val; } else if(!strcmp(opts, "ip")) { dest_ip = *interpret_addr2(opteq+1); - if (zero_ip(dest_ip)) { + if (is_zero_ip(dest_ip)) { fprintf(stderr,"Can't resolve address %s\n", opteq+1); exit(1); } diff --git a/source/client/smbspool.c b/source/client/smbspool.c index 3d049b588e1..3e583e855e9 100644 --- a/source/client/smbspool.c +++ b/source/client/smbspool.c @@ -29,7 +29,6 @@ */ extern BOOL in_client; /* Boolean for client library */ -extern struct in_addr ipzero; /* Any address */ /* @@ -285,7 +284,7 @@ smb_connect(char *workgroup, /* I - Workgroup */ get_myname(myname); - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, myname, 0x0); make_nmb_name(&called, server, 0x20); |