NeXT needs #define pid_t int in includes.h
authorSamba Release Account <samba-bugs@samba.org>
Thu, 18 Jul 1996 17:09:22 +0000 (17:09 +0000)
committerSamba Release Account <samba-bugs@samba.org>
Thu, 18 Jul 1996 17:09:22 +0000 (17:09 +0000)
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)

source3/include/includes.h
source3/namedbname.c

index 55423dc431959ce83dc6c3dd81977d8c0022f88f..56a63d46aec9e9276a041728fb9e023aba5bbd6d 100644 (file)
@@ -584,6 +584,7 @@ char *mktemp(char *); /* No standard include */
 #define mode_t int
 #define GID_TYPE int
 #define gid_t int
+#define pid_t int
 #define SIGNAL_CAST (void (*)(int))
 #define WAIT3_CAST1 (union wait *)
 #define HAVE_GMTOFF
index c06d10f60c4848397f342fa9187b286794093bf8..37a9fe9c31e812f9c023b4e4e65c27e5202b9200 100644 (file)
@@ -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);