diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-23 20:41:15 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-23 20:41:15 +0200 |
commit | fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0 (patch) | |
tree | 26830fe7d310fc098963401e743666608642445b /source3/nmbd | |
parent | d1bc7e56d0584ef4f1051e39cd1a81182d63f096 (diff) | |
download | samba-fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0.tar.gz samba-fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0.tar.bz2 samba-fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0.zip |
Use common net utility code (address and sockaddr manipulation).
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_mynames.c | 3 | ||||
-rw-r--r-- | source3/nmbd/nmbd_sendannounce.c | 4 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 16 |
3 files changed, 12 insertions, 11 deletions
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c index 62c8dd0cf0..ed48095f23 100644 --- a/source3/nmbd/nmbd_mynames.c +++ b/source3/nmbd/nmbd_mynames.c @@ -168,7 +168,8 @@ bool register_my_workgroup_and_names(void) 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(&ip, cluster_addresses[a])); + ip = interpret_addr2(cluster_addresses[a]); + add_ip_to_name_record(namerec, ip); } } } diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c index 3cc9bb52b0..d5a7ba58fd 100644 --- a/source3/nmbd/nmbd_sendannounce.c +++ b/source3/nmbd/nmbd_sendannounce.c @@ -490,7 +490,7 @@ void announce_remote(time_t t) else wgroup = pwgroup; - (void)interpret_addr2(&addr,s2); + addr = interpret_addr2(s2); /* Announce all our names including aliases */ /* Give the ip address as the address of our first @@ -574,7 +574,7 @@ for workgroup %s on subnet %s.\n", lp_workgroup(), FIRST_SUBNET->subnet_name )); frame = talloc_stackframe(); for (ptr=s; next_token_talloc(frame,&ptr,&s2,NULL); ) { /* The entries are of the form a.b.c.d */ - (void)interpret_addr2(&addr,s2); + addr = interpret_addr2(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 5ee6e83138..74bed684fd 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -701,7 +701,7 @@ bool initialise_wins(void) next_token_talloc(frame,&ptr,&ttl_str,NULL); for(i = 0; i < num_ips; i++) { next_token_talloc(frame,&ptr, &ip_str, NULL); - (void)interpret_addr2(&ip_list[i], ip_str); + ip_list[i] = interpret_addr2(ip_str); } next_token_talloc(frame,&ptr,&nb_flags_str,NULL); @@ -835,7 +835,7 @@ void wins_process_name_refresh_request( struct subnet_record *subrec, struct in_addr from_ip; struct in_addr our_fake_ip; - (void)interpret_addr2(&our_fake_ip, "0.0.0.0"); + our_fake_ip = interpret_addr2("0.0.0.0"); putip( (char *)&from_ip, &nmb->additional->rdata[2] ); if(bcast) { @@ -1142,7 +1142,7 @@ void wins_process_name_registration_request(struct subnet_record *subrec, bool registering_group_name = (nb_flags & NB_GROUP) ? True : False; struct in_addr our_fake_ip; - (void)interpret_addr2(&our_fake_ip, "0.0.0.0"); + our_fake_ip = interpret_addr2("0.0.0.0"); putip((char *)&from_ip,&nmb->additional->rdata[2]); if(bcast) { @@ -1217,7 +1217,7 @@ to register name %s. Name already exists in WINS with source type %d.\n", */ if(registering_group_name && (question->name_type != 0x1c)) { - (void)interpret_addr2(&from_ip, "255.255.255.255"); + from_ip = interpret_addr2("255.255.255.255"); } /* @@ -1424,7 +1424,7 @@ static void wins_multihomed_register_query_success(struct subnet_record *subrec, int ttl; struct in_addr our_fake_ip; - (void)interpret_addr2(&our_fake_ip, "0.0.0.0"); + our_fake_ip = interpret_addr2("0.0.0.0"); memcpy((char *)&orig_reg_packet, userdata->data, sizeof(struct packet_struct *)); nmb = &orig_reg_packet->packet.nmb; @@ -1515,7 +1515,7 @@ void wins_process_multihomed_name_registration_request( struct subnet_record *su struct in_addr our_fake_ip; unstring qname; - (void)interpret_addr2(&our_fake_ip, "0.0.0.0"); + our_fake_ip = interpret_addr2("0.0.0.0"); putip((char *)&from_ip,&nmb->additional->rdata[2]); if(bcast) { @@ -2141,7 +2141,7 @@ static int wins_processing_traverse_fn(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA struct name_record *namerec = NULL; struct in_addr our_fake_ip; - (void)interpret_addr2(&our_fake_ip, "0.0.0.0"); + our_fake_ip = interpret_addr2("0.0.0.0"); if (kbuf.dsize != sizeof(unstring) + 1) { return 0; } @@ -2422,7 +2422,7 @@ void nmbd_wins_new_entry(struct messaging_context *msg, struct in_addr our_fake_ip; int i; - (void)interpret_addr2(&our_fake_ip, "0.0.0.0"); + our_fake_ip = interpret_addr2("0.0.0.0"); if (buf==NULL) { return; } |