From: probe Date: Mon, 29 Jun 1992 10:19:17 +0000 (+0000) Subject: Removed ID hashing code (it doesn't really help) X-Git-Tag: release77~501 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/fb82aa2cb8d1bfa03bcb0096811dd0779aec71ee Removed ID hashing code (it doesn't really help) --- diff --git a/afssync/sync.qc b/afssync/sync.qc index 093f294f..a35268a4 100644 --- a/afssync/sync.qc +++ b/afssync/sync.qc @@ -27,7 +27,6 @@ int dbase_fd; struct hash *users; struct hash *groups; -struct hash *idpos; main(argc, argv) int argc; @@ -59,7 +58,6 @@ char **argv; initialize_pt_error_table(); Initdb(); /* Initialize prdb */ - idpos = create_hash(20000); users = create_hash(10000); groups = create_hash(15000); @@ -144,7 +142,7 @@ do_groups() /* If this list is hidden, set the pts entry to be s---- */ if (hide && (status==0 || status==PRIDEXIST)) { - gpos = get_id(aid); + gpos = FindByID(0, aid); status = pr_ReadEntry(0, 0, gpos, &gentry); if (!status) { gentry.flags = PRGRP|PRACCESS|PRP_STATUS_ANY; @@ -166,7 +164,7 @@ do_groups() (g = (long) hash_lookup(groups, lid))) { if (g==ANYUSERID || g==AUTHUSERID || u==ANONYMOUSID) { status = PRPERM; - } else if ((gpos = get_id(g)) && (upos = get_id(u))) { + } else if ((gpos = FindByID(0,g)) && (upos = FindByID(0,u))) { status = pr_ReadEntry(0,0,upos,&uentry); if (!status) status = pr_ReadEntry(0,0,gpos,&gentry); if (!status) status = AddToEntry (0, &gentry, gpos, u); @@ -186,18 +184,6 @@ do_groups() ##} -get_id(id) -{ - long i; - - if (i=(long)hash_lookup(idpos, id)) - return i; - hash_store(idpos, id, i=FindByID(0, id)); - return i; -} - - - /* * ingerr: (supposedly) called when Ingres indicates an error. * I have not yet been able to get this to work to intercept a