summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_nameregister.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-28 06:19:14 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-28 06:19:14 +0000
commited9a219c8719063898c9b39ade0ba1b10739db98 (patch)
tree0bfab52870c9bf4c020c94bf56d1a299938186c1 /source3/nmbd/nmbd_nameregister.c
parentc4fcf56380739cc58a2096aefe587bee50fde27d (diff)
downloadsamba-ed9a219c8719063898c9b39ade0ba1b10739db98.tar.gz
samba-ed9a219c8719063898c9b39ade0ba1b10739db98.tar.bz2
samba-ed9a219c8719063898c9b39ade0ba1b10739db98.zip
fix minor nits in nmbd from adtam@cup.hp.com
samba-patches 959 (This used to be commit ef04261e2510b658322336ce841b01f1c903eee2)
Diffstat (limited to 'source3/nmbd/nmbd_nameregister.c')
-rw-r--r--source3/nmbd/nmbd_nameregister.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c
index 4ac5473d4a..b6d3c20d99 100644
--- a/source3/nmbd/nmbd_nameregister.c
+++ b/source3/nmbd/nmbd_nameregister.c
@@ -106,17 +106,7 @@ static void register_name_response(struct subnet_record *subrec,
success = False;
} else {
/* Unicast - check to see if the response allows us to have the name. */
- if(nmb->header.rcode != 0) {
- /* Error code - we didn't get the name. */
- success = False;
-
- DEBUG(0,("register_name_response: %sserver at IP %s rejected our name registration of %s IP %s with error code %d.\n",
- subrec==unicast_subnet?"WINS ":"",
- inet_ntoa(p->ip),
- nmb_namestr(answer_name),
- reg_name,
- nmb->header.rcode));
- } else if (nmb->header.opcode == NMB_WACK_OPCODE) {
+ if (nmb->header.opcode == NMB_WACK_OPCODE) {
/* WINS server is telling us to wait. Pretend we didn't get
the response but don't send out any more register requests. */
@@ -128,6 +118,16 @@ static void register_name_response(struct subnet_record *subrec,
rrec->repeat_time = p->timestamp + nmb->answers->ttl;
rrec->num_msgs--;
return;
+ } else if (nmb->header.rcode != 0) {
+ /* Error code - we didn't get the name. */
+ success = False;
+
+ DEBUG(0,("register_name_response: %sserver at IP %s rejected our name registration of %s IP %s with error code %d.\n",
+ subrec==unicast_subnet?"WINS ":"",
+ inet_ntoa(p->ip),
+ nmb_namestr(answer_name),
+ reg_name,
+ nmb->header.rcode));
} else {
success = True;
/* Get the data we need to pass to the success function. */