]> andersk Git - moira.git/blobdiff - dbck/phase4.qc
missing include of ctype.h
[moira.git] / dbck / phase4.qc
index 55624e479ac6fb35f29e0f74e4380acc552be55e..535a22a3be1cb2f1b8bad4a6340120539c053c10 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <mit-copyright.h>
+#include <moira.h>
 #include "dbck.h"
 
 static char phase4_qc_rcsid[] = "$Header$";
@@ -21,9 +22,11 @@ struct hash *boxes;
     if (u->potype == 'P') {
        if (i = (int) hash_lookup(boxes, u->pobox_id))
          hash_store(boxes, u->pobox_id, i+1);
-       else
+       else {
          printf("User %s(%s) has pobox on non-POP server %d\n",
                 u->fullname, u->login, u->pobox_id);
+         printf("Not fixing this error\n");
+        }
     }
 }
 
@@ -119,6 +122,8 @@ count_only_setup()
 ##           id2 = u.pop_id, id3 = u.box_id) 
 ##    where u.potype = "POP" {
        u = (struct user *) malloc(sizeof(struct user));
+       if (u == NULL)
+         out_of_mem("storing users");
        strcpy(u->login, strtrim(name));
        u->potype = buf[0];
        sprintf(buf, "%s, %s", strtrim(last), strtrim(first));
@@ -143,6 +148,8 @@ count_only_setup()
 ##  range of m is machine
 ##  retrieve (id = m.mach_id, name = m.#name) {
        m = (struct machine *) malloc(sizeof(struct machine));
+       if (m == NULL)
+         out_of_mem("storing machines");
        strcpy(m->name, strtrim(name));
        m->mach_id = id;
        hash_store(machines, id, m);
@@ -153,6 +160,8 @@ count_only_setup()
 ##  retrieve (id = nfsphys.nfsphys_id, name = nfsphys.dir,
 ##           id2 = nfsphys.mach_id, id3 = nfsphys.allocated) {
        n = (struct nfsphys *) malloc(sizeof(struct nfsphys));
+       if (n == NULL)
+         out_of_mem("storing nfsphys");
        strcpy(n->dir, strtrim(name));
        n->mach_id = id2;
        n->nfsphys_id = id;
@@ -162,7 +171,7 @@ count_only_setup()
 ##  }
 
     dprintf("Counting quotas...\n");
-##  retrieve (id = nfsquota.phys_id, id2 = nfsquota.quota) {
+##  retrieve (id = quota.phys_id, id2 = quota.quota) {
         if (n = (struct nfsphys  *) hash_lookup(nfsphys, id)) {
            n->count += id2;
        }
This page took 0.038773 seconds and 4 git commands to generate.