diff options
author | Jeremy Allison <jra@samba.org> | 1998-06-25 23:51:28 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-06-25 23:51:28 +0000 |
commit | bc39cff279ef3df174c1d1408f90e88666e64237 (patch) | |
tree | c9e4fdd27c62dcafddb1b76209ffb11c567a21b1 /source3 | |
parent | a6c94aa84e7495396d29b942f08e5d2158c30538 (diff) | |
download | samba-bc39cff279ef3df174c1d1408f90e88666e64237.tar.gz samba-bc39cff279ef3df174c1d1408f90e88666e64237.tar.bz2 samba-bc39cff279ef3df174c1d1408f90e88666e64237.zip |
clitar.c: Fixed gcc warning with comment in /* */ code.
nmbd_winsserver.c: Remember to free packet in multi-homed register code.
Use correct query_name_from_wins_server call instead of
query_name call in multihomed code.
Jeremy.
(This used to be commit 6e995802fecb4474003db55a69c9e1663737aade)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/client/clitar.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 34 |
2 files changed, 23 insertions, 13 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index eba82ba217..d286477d7d 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1973,7 +1973,7 @@ static void do_tarput() if (tar_real_noisy) { DEBUG(0, ("Could not set time on file: %s\n", finfo.name)); } - /*return; /* Win 95 does not like setting time on dirs */ + /*return; - Win 95 does not like setting time on dirs */ } diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index e8dd78f1ab..f663362706 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -881,6 +881,10 @@ static void wins_multihomed_register_query_success(struct subnet_record *subrec, DEBUG(3,("wins_multihomed_register_query_success: name %s is not in the correct state to add \ a subsequent IP addess.\n", namestr(question_name) )); send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet); + + orig_reg_packet->locked = False; + free_packet(orig_reg_packet); + return; } @@ -889,6 +893,8 @@ a subsequent IP addess.\n", namestr(question_name) )); update_name_ttl(namerec, ttl); send_wins_name_registration_response(0, ttl, orig_reg_packet); + orig_reg_packet->locked = False; + free_packet(orig_reg_packet); } /*********************************************************************** @@ -912,6 +918,9 @@ static void wins_multihomed_register_query_fail(struct subnet_record *subrec, DEBUG(3,("wins_multihomed_register_query_fail: Registering machine at IP %s failed to answer \ query successfully for name %s.\n", inet_ntoa(orig_reg_packet->ip), namestr(question_name) )); send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet); + + orig_reg_packet->locked = False; + free_packet(orig_reg_packet); return; } @@ -1100,20 +1109,21 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) ) userdata->userdata_len = sizeof(struct packet_struct *); memcpy(userdata->data, (char *)&p, sizeof(struct packet_struct *) ); - /* - * As query_name uses the subnet broadcast address as the destination - * of the packet we temporarily change the subnet broadcast address to - * be the IP address of the requesting machine and send the packet. This - * is a *horrible* hack but the alternative is to add the destination - * address parameter to all query_name() calls. I hate this code :-). + /* + * Use the new call to send a query directly to an IP address. + * This sends the query directly to the IP address, and ensures + * the recursion desired flag is not set (you were right Luke :-). + * This function should *only* be called from the WINS server + * code. JRA. */ - subrec->bcast_ip = p->ip; - query_name( subrec, question->name, question->name_type, - wins_multihomed_register_query_success, - wins_multihomed_register_query_fail, - userdata); - subrec->bcast_ip = ipzero; + query_name_from_wins_server( p->ip, + question->name, + question->name_type, + wins_multihomed_register_query_success, + wins_multihomed_register_query_fail, + userdata ); + return; } |