summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_subnetdb.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-06-29 22:50:49 +0000
committerJeremy Allison <jra@samba.org>1998-06-29 22:50:49 +0000
commit06e42fa8659483495055eb3aab1982ebf3d0efa3 (patch)
tree5afeb9cb14c43cbaa418f0bc2291fce42ea1a4c5 /source3/nmbd/nmbd_subnetdb.c
parentfdb124c1cd0e91fa2a5f1c993a1df12fb866cca9 (diff)
downloadsamba-06e42fa8659483495055eb3aab1982ebf3d0efa3.tar.gz
samba-06e42fa8659483495055eb3aab1982ebf3d0efa3.tar.bz2
samba-06e42fa8659483495055eb3aab1982ebf3d0efa3.zip
nmbd_elections.c: Removed force elections code to bring into line with 1.9.18.
nmbd_namelistdb.c: Added comment for Chris. nmbd_subnetdb.c: Went back to Chris's comparison code as with the make_nmb_name change it all works now. lib/rpc/server/srv_netlog.c: Ensure we return 'account disabled' for disabled accounts, rather than crashing. Jeremy. (This used to be commit 4ab3d1682789319965a55edb37212b7671a743bb)
Diffstat (limited to 'source3/nmbd/nmbd_subnetdb.c')
-rw-r--r--source3/nmbd/nmbd_subnetdb.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 40ae1db1b3..36a3ee9a27 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -74,6 +74,7 @@ static void add_subnet(struct subnet_record *subrec)
}
/* CRH!!! */
+#if 0
/* ************************************************************************** ** * This will go away when we move to a "real" database back-end.
Note that we cannot use memcmp here as we have no control
over how the struct nmb_name structures are packed in memory. JRA.
@@ -97,6 +98,24 @@ int namelist_entry_compare( ubi_trItemPtr Item, ubi_trNodePtr Node )
return nmbname->name_type - NR->name.name_type;
} /* namelist_entry_compare */
+#else
+/* ************************************************************************** **
+ * This will go away when we move to a "real" database back-end.
+ * ************************************************************************** **
+ */
+int namelist_entry_compare( ubi_trItemPtr Item, ubi_trNodePtr Node )
+ {
+ struct name_record *NR = (struct name_record *)Node;
+
+ struct nmb_name *Iname = (struct nmb_name *)Item;
+ DEBUG(10, ("namelist_entry_compare: %d == memcmp( \"%s\", \"%s\", %d )\n",
+ memcmp( Item, &(NR->name), sizeof(struct nmb_name) ),
+ namestr(Iname), namestr(&NR->name), sizeof(struct nmb_name)) );
+
+ return( memcmp( Item, &(NR->name), sizeof(struct nmb_name) ) );
+ } /* namelist_entry_compare */
+
+#endif
/* CRH!!! */
/****************************************************************************