]> andersk Git - moira.git/blobdiff - gen/mailhub.dc
Initialize the SMS error table so that if there are errors, they can be
[moira.git] / gen / mailhub.dc
index e5f420d4f483cb0fc6f4d22afca9b7de9e7b62e9..86987d2474cd776018653615657bfd18394769d8 100644 (file)
@@ -153,15 +153,18 @@ get_info()
      */
     EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
 
+    /* Get Locks */
+
     EXEC SQL SELECT modtime INTO :buf FROM users WHERE users_id = 0;
     EXEC SQL SELECT modtime INTO :buf FROM list WHERE list_id = 0;
 
     cnt = 0;
-    machines = create_hash(10);
+    machines = create_hash(1000);
 
     EXEC SQL DECLARE m_cursor CURSOR FOR
       SELECT mach_id, name
       FROM machine
+      WHERE status=1
       ORDER BY mach_id;
     EXEC SQL OPEN m_cursor;
     while (1) {
@@ -313,7 +316,7 @@ get_info()
     return;
  sqlerr:
     com_err(whoami, MR_INGRES_ERR, " code %d\n", sqlca.sqlcode);
-    critical_alert("DCM", "Hesiod build encountered DATABASE ERROR %d",
+    critical_alert("DCM", "Mailhub build encountered DATABASE ERROR %d",
                   sqlca.sqlcode);
     exit(MR_INGRES_ERR);
 }
@@ -568,11 +571,16 @@ register char *s;
 {
     register wwid;
     static int cont = 1;
+    char str[8];
 
     wwid = strlen(s);
 
     if (!bol && awid + wwid + 2 > AL_MAX_WID) {
-       fprintf(out, ",\n\tcontinuation-%d\ncontinuation-%d: ", cont, cont);
+       sprintf(str, "%c%c%c%c%c%c", random() % 26 + 97, random() % 26 + 97,
+                                     random() % 26 + 97, random() % 26 + 97,
+                                    random() % 26 + 97, random() % 26 + 97);
+       str[6] = '\0';                  
+       fprintf(out, ",\n\tcont%d-%s\ncont%d-%s: ", cont, str, cont, str);
        cont++;
        awid = lwid = 17 + wwid;
        fputs(s, out);
This page took 0.238334 seconds and 4 git commands to generate.