mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
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)
This commit is contained in:
parent
90357bb3b0
commit
bcfba000df
@ -584,6 +584,7 @@ char *mktemp(char *); /* No standard include */
|
|||||||
#define mode_t int
|
#define mode_t int
|
||||||
#define GID_TYPE int
|
#define GID_TYPE int
|
||||||
#define gid_t int
|
#define gid_t int
|
||||||
|
#define pid_t int
|
||||||
#define SIGNAL_CAST (void (*)(int))
|
#define SIGNAL_CAST (void (*)(int))
|
||||||
#define WAIT3_CAST1 (union wait *)
|
#define WAIT3_CAST1 (union wait *)
|
||||||
#define HAVE_GMTOFF
|
#define HAVE_GMTOFF
|
||||||
|
@ -156,24 +156,17 @@ struct name_record *find_name_search(struct subnet_record **d,
|
|||||||
{
|
{
|
||||||
if (*d != NULL)
|
if (*d != NULL)
|
||||||
{
|
{
|
||||||
|
struct name_record *n = find_name((*d)->namelist, name, search);
|
||||||
DEBUG(4,("find_name on local: %s %s search %x\n",
|
DEBUG(4,("find_name on local: %s %s search %x\n",
|
||||||
namestr(name),inet_ntoa(ip), search));
|
namestr(name),inet_ntoa(ip), search));
|
||||||
return find_name((*d)->namelist, name, search);
|
if (n) return n;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUG(4,("local find_name_search with a NULL subnet pointer\n"));
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((search & FIND_WINS) != FIND_WINS) return NULL;
|
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;
|
if (*d == NULL) return NULL;
|
||||||
|
|
||||||
@ -222,7 +215,7 @@ void dump_names(void)
|
|||||||
anything other than as a hexadecimal number :-) */
|
anything other than as a hexadecimal number :-) */
|
||||||
|
|
||||||
sprintf(data, "%s#%02x %s %2x %ld",
|
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),
|
inet_ntoa(n->ip),
|
||||||
n->nb_flags,
|
n->nb_flags,
|
||||||
n->death_time);
|
n->death_time);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user