]> andersk Git - moira.git/blobdiff - server/qsupport.qc
added locks to many queries
[moira.git] / server / qsupport.qc
index 0aba3b1fff843a3d1459d3166a270bdb28ff70b6..557e13c4844f5283def6e525140454c9f3f69182 100644 (file)
@@ -731,8 +731,8 @@ setup_ufil(q, argv)
 ##}
 
 
-/* setup_dfil: free any quota records associated with a filesystem
- * when it is deleted.
+/* setup_dfil: free any quota records and fsgroup info associated with
+ * a filesystem when it is deleted.  Also adjust the allocation numbers.
  */
 
 setup_dfil(q, argv, cl)
@@ -750,6 +750,8 @@ setup_dfil(q, argv, cl)
 ##     where n.nfsphys_id = fs.phys_id and fs.filsys_id = @id
 
 ##  repeat delete q where q.filsys_id = @id
+##  repeat delete fsgroup where fsgroup.filsys_id = @id
+##  repeat delete fsgroup where fsgroup.group_id = @id
     return(SMS_SUCCESS);
 ##}
 
@@ -891,25 +893,24 @@ set_pobox_modtime(q, argv, cl)
 ##}
 
 
-/* Sets the modtime on a machine record.  The machine name is in argv[0].
- * This routine is different from the generic set_modtime in that the
- * name is uppercased first.
+/* Like set_modtime, but uppercases the name first.
  */
 
-set_mach_modtime(q, argv, cl)
+set_uppercase_modtime(q, argv, cl)
     struct query *q;
     char **argv;
     client *cl;
 ##{
-##  char *host, *entity;
+##  char *name, *entity, *table;
 ##  int who;
 
     entity = cl->entity;
     who = cl->users_id;
+    table = q->rtable;
+    name = argv[0];
 
-    host = argv[0];
-##  repeat replace m (modtime = "now", modby = @who, modwith = @entity)
-##      where m.name = uppercase(@host)
+##  replace table (modtime = "now", modby = who, modwith = entity)
+##      where table.#name = uppercase(name)
     return(SMS_SUCCESS);
 ##}
 
@@ -2171,7 +2172,7 @@ register_user(q, argv, cl)
 ##  repeat retrieve (flag = any(l.#name where l.#name = @login))
     if (flag)
       return(SMS_IN_USE);
-##  repeat retrieve (flag = any(filesys.#name where filesys.#name = @login))
+##  repeat retrieve (flag = any(filesys.#label where filesys.#label = @login))
     if (flag)
       return(SMS_IN_USE);
     com_err(whoami, 0, "new login name OK");
This page took 0.233155 seconds and 4 git commands to generate.