summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-03-15 19:08:18 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-03-15 19:08:18 +0000
commit83329ef56e158fab58b22454d223603293600094 (patch)
tree0ccb235326f6c99c8247bed8e2de10fa6ce22ce7 /source3
parentc0a0de60dfbf2d34520facd1f5cc15bde1adf0ff (diff)
downloadsamba-83329ef56e158fab58b22454d223603293600094.tar.gz
samba-83329ef56e158fab58b22454d223603293600094.tar.bz2
samba-83329ef56e158fab58b22454d223603293600094.zip
finally! doing a strequal() == 0 instead of just strequal(). too used to
strcmp. oops. lkcl (This used to be commit cb8d00fff3062b1784c99c61b61e4a0899ff2771)
Diffstat (limited to 'source3')
-rw-r--r--source3/nameelect.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source3/nameelect.c b/source3/nameelect.c
index e1f36ae250..c33206083e 100644
--- a/source3/nameelect.c
+++ b/source3/nameelect.c
@@ -199,18 +199,15 @@ void name_unregister_work(struct subnet_record *d, char *name, int name_type)
{
remove_type_local |= SV_TYPE_MASTER_BROWSER;
}
- if (AM_MASTER(work) && strequal(name, lp_workgroup()) == 0 &&
- name_type == 0x1d)
+ if (AM_MASTER(work) && strequal(name, lp_workgroup()) && name_type == 0x1d)
{
remove_type_local |= SV_TYPE_MASTER_BROWSER;
}
- if (AM_DOMMST(work) && strequal(name, lp_workgroup()) == 0 &&
- name_type == 0x1b)
+ if (AM_DOMMST(work) && strequal(name, lp_workgroup()) && name_type == 0x1b)
{
remove_type_domain |= SV_TYPE_DOMAIN_MASTER;
}
- if (AM_DOMMEM(work) && strequal(name, lp_workgroup()) == 0 &&
- name_type == 0x1c)
+ if (AM_DOMMEM(work) && strequal(name, lp_workgroup()) && name_type == 0x1c)
{
remove_type_logon|= SV_TYPE_DOMAIN_MEMBER;
}
@@ -246,21 +243,23 @@ void name_register_work(struct subnet_record *d, char *name, int name_type,
int add_type_domain = False;
int add_type_logon = False;
+ DEBUG(4,("checking next stage: name_register_work %s\n", name));
+
/* work out what to become, from the name type being added */
if (ms_browser_name(name, name_type))
{
add_type_local = True;
}
- if (strequal(name, lp_workgroup()) == 0 && name_type == 0x1d)
+ if (strequal(name, lp_workgroup()) && name_type == 0x1d)
{
add_type_local = True;
}
- if (strequal(name, lp_workgroup()) == 0 && name_type == 0x1b)
+ if (strequal(name, lp_workgroup()) && name_type == 0x1b)
{
add_type_domain = True;
}
- if (strequal(name, lp_workgroup()) == 0 && name_type == 0x1c)
+ if (strequal(name, lp_workgroup()) && name_type == 0x1c)
{
add_type_logon = True;
}
@@ -401,7 +400,7 @@ void become_domain_master(struct subnet_record *d, struct work_record *work)
not a workgroup
*/
- if (!work || !d) return;
+ if ((!work) || (!d)) return;
DEBUG(2,("Becoming domain master for %s %s (currently at stage %d)\n",
work->work_group,inet_ntoa(d->bcast_ip),work->dom_state));