summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-11-26 03:11:44 +0000
committerTim Potter <tpot@samba.org>2001-11-26 03:11:44 +0000
commit585d0efbc6428e5876d354fee49c241c1bad809d (patch)
tree48ef6538dc6855f6084a63fde1097032cc9e2ebc /source3/client
parent8b7434b2a0b8d138cd83e4feeecb9127d729c437 (diff)
downloadsamba-585d0efbc6428e5876d354fee49c241c1bad809d.tar.gz
samba-585d0efbc6428e5876d354fee49c241c1bad809d.tar.bz2
samba-585d0efbc6428e5876d354fee49c241c1bad809d.zip
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/client')
-rw-r--r--source3/client/client.c12
-rw-r--r--source3/client/smbmount.c7
-rw-r--r--source3/client/smbspool.c3
3 files changed, 8 insertions, 14 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index c684f3fea6..2b0867cf7b 100644
--- a/source3/client/client.c
+++ b/source3/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/source3/client/smbmount.c b/source3/client/smbmount.c
index d929599e56..3aeddfabca 100644
--- a/source3/client/smbmount.c
+++ b/source3/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/source3/client/smbspool.c b/source3/client/smbspool.c
index 3d049b588e..3e583e855e 100644
--- a/source3/client/smbspool.c
+++ b/source3/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);