summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-03 22:34:46 -0700
committerJeremy Allison <jra@samba.org>2007-11-03 22:34:46 -0700
commit51a0354d751f48a2542984c81e218da33669bbeb (patch)
tree27e620eb5d4e72e2a07591645680e6776491702b /source3/nmbd
parent56aa420195f4bf8007fbbbe362dbaf961a97f423 (diff)
downloadsamba-51a0354d751f48a2542984c81e218da33669bbeb.tar.gz
samba-51a0354d751f48a2542984c81e218da33669bbeb.tar.bz2
samba-51a0354d751f48a2542984c81e218da33669bbeb.zip
Remove more static data from lib/util_sock.c and
callers. Jeremy. (This used to be commit 35aaa36f82c70964cee5d0778eb04547b226dd3f)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_mynames.c5
-rw-r--r--source3/nmbd/nmbd_sendannounce.c4
-rw-r--r--source3/nmbd/nmbd_winsserver.c22
3 files changed, 19 insertions, 12 deletions
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c
index 2eb376fc17..62c8dd0cf0 100644
--- a/source3/nmbd/nmbd_mynames.c
+++ b/source3/nmbd/nmbd_mynames.c
@@ -162,12 +162,13 @@ bool register_my_workgroup_and_names(void)
for(subrec = FIRST_SUBNET; subrec; subrec = subrec->next) {
for (n=0;n<ARRAY_SIZE(name_types);n++) {
struct name_record *namerec;
- struct nmb_name nmbname;
+ struct nmb_name nmbname;
+ struct in_addr ip;
make_nmb_name(&nmbname, my_netbios_names(i), name_types[n]);
namerec = find_name_on_subnet(unicast_subnet, &nmbname, FIND_SELF_NAME);
if (namerec == NULL) continue;
for (a=0;cluster_addresses[a];a++) {
- add_ip_to_name_record(namerec, *interpret_addr2(cluster_addresses[a]));
+ add_ip_to_name_record(namerec, *interpret_addr2(&ip, cluster_addresses[a]));
}
}
}
diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c
index 6670c55bf3..56cd497568 100644
--- a/source3/nmbd/nmbd_sendannounce.c
+++ b/source3/nmbd/nmbd_sendannounce.c
@@ -488,7 +488,7 @@ void announce_remote(time_t t)
else
wgroup = pwgroup;
- addr = *interpret_addr2(s2);
+ (void)interpret_addr2(&addr,s2);
/* Announce all our names including aliases */
/* Give the ip address as the address of our first
@@ -569,7 +569,7 @@ for workgroup %s on subnet %s.\n", lp_workgroup(), FIRST_SUBNET->subnet_name ));
for (ptr=s; next_token(&ptr,s2,NULL,sizeof(s2)); ) {
/* The entries are of the form a.b.c.d */
- addr = *interpret_addr2(s2);
+ (void)interpret_addr2(&addr,s2);
DEBUG(5,("announce_remote: Doing remote browse sync announce for server %s to IP %s.\n",
global_myname(), inet_ntoa(addr) ));
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 736bbf4068..d4a2c8346e 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -680,7 +680,7 @@ bool initialise_wins(void)
next_token(&ptr,ttl_str,NULL,sizeof(ttl_str));
for(i = 0; i < num_ips; i++) {
next_token(&ptr, ip_str, NULL, sizeof(ip_str));
- ip_list[i] = *interpret_addr2(ip_str);
+ (void)interpret_addr2(&ip_list[i], ip_str);
}
next_token(&ptr,nb_flags_str,NULL, sizeof(nb_flags_str));
@@ -810,8 +810,9 @@ void wins_process_name_refresh_request( struct subnet_record *subrec,
struct name_record *namerec = NULL;
int ttl = get_ttl_from_packet(nmb);
struct in_addr from_ip;
- struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
+ struct in_addr our_fake_ip;
+ (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
putip( (char *)&from_ip, &nmb->additional->rdata[2] );
if(bcast) {
@@ -1116,8 +1117,9 @@ void wins_process_name_registration_request(struct subnet_record *subrec,
struct name_record *namerec = NULL;
struct in_addr from_ip;
bool registering_group_name = (nb_flags & NB_GROUP) ? True : False;
- struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
+ struct in_addr our_fake_ip;
+ (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
putip((char *)&from_ip,&nmb->additional->rdata[2]);
if(bcast) {
@@ -1192,7 +1194,7 @@ to register name %s. Name already exists in WINS with source type %d.\n",
*/
if(registering_group_name && (question->name_type != 0x1c)) {
- from_ip = *interpret_addr2("255.255.255.255");
+ (void)interpret_addr2(&from_ip, "255.255.255.255");
}
/*
@@ -1397,8 +1399,9 @@ static void wins_multihomed_register_query_success(struct subnet_record *subrec,
struct name_record *namerec = NULL;
struct in_addr from_ip;
int ttl;
- struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
+ struct in_addr our_fake_ip;
+ (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
memcpy((char *)&orig_reg_packet, userdata->data, sizeof(struct packet_struct *));
nmb = &orig_reg_packet->packet.nmb;
@@ -1486,9 +1489,10 @@ void wins_process_multihomed_name_registration_request( struct subnet_record *su
struct name_record *namerec = NULL;
struct in_addr from_ip;
bool group = (nb_flags & NB_GROUP) ? True : False;
- struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
+ struct in_addr our_fake_ip;
unstring qname;
+ (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
putip((char *)&from_ip,&nmb->additional->rdata[2]);
if(bcast) {
@@ -2112,8 +2116,9 @@ static int wins_processing_traverse_fn(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA
time_t t = *(time_t *)state;
bool store_record = False;
struct name_record *namerec = NULL;
- struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
+ struct in_addr our_fake_ip;
+ (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
if (kbuf.dsize != sizeof(unstring) + 1) {
return 0;
}
@@ -2381,9 +2386,10 @@ void nmbd_wins_new_entry(struct messaging_context *msg,
struct name_record *new_namerec = NULL;
struct nmb_name question;
bool overwrite=False;
- struct in_addr our_fake_ip = *interpret_addr2("0.0.0.0");
+ struct in_addr our_fake_ip;
int i;
+ (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
if (buf==NULL) {
return;
}