]> andersk Git - moira.git/commitdiff
Removed ID hashing code (it doesn't really help)
authorprobe <probe>
Mon, 29 Jun 1992 10:19:17 +0000 (10:19 +0000)
committerprobe <probe>
Mon, 29 Jun 1992 10:19:17 +0000 (10:19 +0000)
afssync/sync.qc

index 093f294fbc0ab716b642735f80a5a4737d3a0a1f..a35268a4fdd52a874b36d43d1e53b28062035915 100644 (file)
@@ -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
This page took 0.196597 seconds and 5 git commands to generate.