summaryrefslogtreecommitdiff
path: root/source3/namedbname.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-07-18 17:09:22 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-07-18 17:09:22 +0000
commitbcfba000df14c5178fb761cf8ceb08b337b52b79 (patch)
tree918f00002cd15a1a738b0489404a1a5c4f583ed0 /source3/namedbname.c
parent90357bb3b0a9cc65308800c7a483975fdb384637 (diff)
downloadsamba-bcfba000df14c5178fb761cf8ceb08b337b52b79.tar.gz
samba-bcfba000df14c5178fb761cf8ceb08b337b52b79.tar.bz2
samba-bcfba000df14c5178fb761cf8ceb08b337b52b79.zip
NeXT needs #define pid_t int in includes.h
namedbname.c:find_name_search() needed search capability on both local subnet records and WINS records. it used to return NULL if the name was not found in the local subnet records even if you asked it to search the WINS name records as well. (This used to be commit 96c2efded884ce4390c5da68afaccca9acc17558)
Diffstat (limited to 'source3/namedbname.c')
-rw-r--r--source3/namedbname.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source3/namedbname.c b/source3/namedbname.c
index c06d10f60c..37a9fe9c31 100644
--- a/source3/namedbname.c
+++ b/source3/namedbname.c
@@ -156,24 +156,17 @@ struct name_record *find_name_search(struct subnet_record **d,
{
if (*d != NULL)
{
+ struct name_record *n = find_name((*d)->namelist, name, search);
DEBUG(4,("find_name on local: %s %s search %x\n",
namestr(name),inet_ntoa(ip), search));
- return find_name((*d)->namelist, name, search);
- }
- else
- {
- DEBUG(4,("local find_name_search with a NULL subnet pointer\n"));
- return NULL;
+ if (n) return n;
}
}
if ((search & FIND_WINS) != FIND_WINS) return NULL;
- if (*d == NULL)
- {
- /* find WINS subnet record */
- *d = find_subnet(ipgrp);
- }
+ /* find WINS subnet record. */
+ *d = find_subnet(ipgrp);
if (*d == NULL) return NULL;
@@ -222,7 +215,7 @@ void dump_names(void)
anything other than as a hexadecimal number :-) */
sprintf(data, "%s#%02x %s %2x %ld",
- n->name.name,n->name.name_type, /* XXXX ignore the scope for now */
+ n->name.name,n->name.name_type, /* XXXX ignore scope for now */
inet_ntoa(n->ip),
n->nb_flags,
n->death_time);