]> andersk Git - moira.git/blobdiff - server/increment.qc
Used /bin/sh format instead of /bin/csh format, by accident.
[moira.git] / server / increment.qc
index b0dd84ba1f1c1f0c1e67229210bc1436d9545ce1..c7b3b720f1d218b23e8d92bf6f7e1e89b0cb284b 100644 (file)
@@ -14,9 +14,9 @@ static char *rcsid_qrtn_qc = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
 #include "query.h"
-#include "sms_server.h"
+#include "mr_server.h"
 
 extern char *whoami;
 char *malloc();
@@ -144,14 +144,15 @@ char **argv;
 ##               barg10 = fs.lockertype)
 ##       where qual
        beforec = 11;
-    } else if (!strcmp(table, "nfsquota")) {
-       strcpy(barg0, argv[0]);
+    } else if (!strcmp(table, "quota")) {
+       strcpy(barg0, "?");
        strcpy(barg1, argv[1]);
-       sprintf(buffer, "%s and filesys.filsys_id = nq.filsys_id", qual);
+       strcpy(barg2, "?");
+       sprintf(buffer, "%s and filesys.filsys_id = q.filsys_id", qual);
        qual = buffer;
-##     range of nq is nfsquota
-##     retrieve (barg2 = text(nq.quota), barg3 = filesys.name) where qual
-       beforec = 4;
+##     range of q is quota
+##     retrieve (barg3 = text(q.quota), barg4 = filesys.name) where qual
+       beforec = 5;
     } else if (!strcmp(table, "list")) {
 ##     retrieve (barg0 = l.name, barg1 = text(l.active),
 ##               barg2 = text(l.public), barg3 = text(l.hidden),
@@ -162,6 +163,7 @@ char **argv;
        beforec = 10;
     } else if (!strcmp(table, "members")) {
        id = (int) argv[0];
+##     retrieve (barg3 = text(list.group)) where list.list_id = id
        name = malloc(0);
        id_to_name(id, "LIST", &name);
        strcpy(barg0, name);
@@ -178,7 +180,7 @@ char **argv;
        }
        strcpy(barg2, name);
        free(name);
-       beforec = 3;
+       beforec = 4;
     } /* else
       com_err(whoami, 0, "unknown table in incremental_before"); */
 ##}
@@ -239,14 +241,15 @@ char **argv;
 ##               aarg10 = fs.lockertype)
 ##       where qual
        afterc = 11;
-    } else if (!strcmp(table, "nfsquota")) {
-       strcpy(aarg0, argv[0]);
+    } else if (!strcmp(table, "quota")) {
+       strcpy(aarg0, "?");
        strcpy(aarg1, argv[1]);
-       sprintf(buffer, "%s and filesys.filsys_id = nq.filsys_id", qual);
+       strcpy(aarg2, "?");
+       sprintf(buffer, "%s and filesys.filsys_id = q.filsys_id", qual);
        qual = buffer;
-##     range of nq is nfsquota
-##     retrieve (aarg2 = text(nq.quota), aarg3 = filesys.name) where qual
-       afterc = 4;
+##     range of q is quota
+##     retrieve (aarg3 = text(q.quota), aarg4 = filesys.name) where qual
+       afterc = 5;
     } else if (!strcmp(table, "list")) {
 ##     retrieve (aarg0 = l.name, aarg1 = text(l.active),
 ##               aarg2 = text(l.public), aarg3 = text(l.hidden),
@@ -257,6 +260,7 @@ char **argv;
        afterc = 10;
     } else if (!strcmp(table, "members")) {
        id = (int) argv[0];
+##     retrieve (aarg3 = text(list.group)) where list.list_id = id
        name = malloc(0);
        id_to_name(id, "LIST", &name);
        strcpy(aarg0, name);
@@ -273,7 +277,7 @@ char **argv;
        }
        strcpy(aarg2, name);
        free(name);
-       afterc = 3;
+       afterc = 4;
     } else if (!strcmp(table, "clear")) {
        afterc = 0;
        table = beforetable;
@@ -364,6 +368,9 @@ next_incremental()
     char *argv[MAXARGC * 2 + 4], cafter[3], cbefore[3], prog[BUFSIZ];
     int i;
 
+    if (incremental_exec == NULL)
+      incremental_init();
+
     if (sq_empty(incremental_exec) ||
        (inc_running && now - inc_started < INC_TIMEOUT))
       return;
This page took 0.036628 seconds and 4 git commands to generate.