int show_printer_quota(void *id);
int show_printer_ac(void *id);
int show_printer_lpc_acl(void *id);
-int fix_printer_ac(void *id);
-int fix_printer_lpc_acl(void *id);
+void fix_printer_ac(void *id);
+void fix_printer_lpc_acl(void *id);
void user_check(int id, void *user, void *hint);
int maybe_fixup_unref_string(int sid, int oid, char *oname, char *table,
char *field, char *idfield);
char name[PRINTERS_NAME_SIZE];
EXEC SQL END DECLARE SECTION;
- EXEC SQL DECLARE csr235 CURSOR FOR
+ EXEC SQL DECLARE csr236 CURSOR FOR
SELECT name FROM printers WHERE loghost = :iid;
- EXEC SQL OPEN csr235;
+ EXEC SQL OPEN csr236;
while (1)
{
- EXEC SQL FETCH csr235 INTO :name;
+ EXEC SQL FETCH csr236 INTO :name;
if (sqlca.sqlcode)
break;
printf("Printer %s, non-existant spool machine %d in printers table\n",
name, iid);
}
- EXEC SQL CLOSE csr235;
+ EXEC SQL CLOSE csr236;
return found;
}
char name[PRINTERS_NAME_SIZE];
EXEC SQL END DECLARE SECTION;
- EXEC SQL DECLARE csr235 CURSOR FOR
+ EXEC SQL DECLARE csr237 CURSOR FOR
SELECT name FROM printers WHERE rm = :iid;
- EXEC SQL OPEN csr235;
+ EXEC SQL OPEN csr237;
while (1)
{
- EXEC SQL FETCH csr235 INTO :name;
+ EXEC SQL FETCH csr237 INTO :name;
if (sqlca.sqlcode)
break;
printf("Printer %s, non-existant spool machine %d in printers table\n",
name, iid);
}
- EXEC SQL CLOSE csr235;
+ EXEC SQL CLOSE csr237;
return found;
}
char name[PRINTERS_NAME_SIZE];
EXEC SQL END DECLARE SECTION;
- EXEC SQL DECLARE csr236 CURSOR FOR
+ EXEC SQL DECLARE csr238 CURSOR FOR
SELECT name FROM printers WHERE rq = :iid;
- EXEC SQL OPEN csr236;
+ EXEC SQL OPEN csr238;
while (1)
{
- EXEC SQL FETCH csr236 INTO :name;
+ EXEC SQL FETCH csr238 INTO :name;
if (sqlca.sqlcode)
break;
printf("Printer %s, non-existant quota server %d in printers table\n",
name, iid);
}
- EXEC SQL CLOSE csr236;
+ EXEC SQL CLOSE csr238;
return found;
}
char name[PRINTERS_NAME_SIZE];
EXEC SQL END DECLARE SECTION;
- EXEC SQL DECLARE csr236 CURSOR FOR
+ EXEC SQL DECLARE csr239 CURSOR FOR
SELECT name FROM printers WHERE ac = :iid;
- EXEC SQL OPEN csr236;
+ EXEC SQL OPEN csr239;
while (1)
{
- EXEC SQL FETCH csr236 INTO :name;
+ EXEC SQL FETCH csr239 INTO :name;
if (sqlca.sqlcode)
break;
printf("Printer %s, non-existant restrict list %d in printers table\n",
name, iid);
}
- EXEC SQL CLOSE csr236;
+ EXEC SQL CLOSE csr239;
return found;
}
char name[PRINTERS_NAME_SIZE];
EXEC SQL END DECLARE SECTION;
- EXEC SQL DECLARE csr236 CURSOR FOR
+ EXEC SQL DECLARE csr240 CURSOR FOR
SELECT name FROM printers WHERE lpc_acl = :iid;
- EXEC SQL OPEN csr236;
+ EXEC SQL OPEN csr240;
while (1)
{
- EXEC SQL FETCH csr236 INTO :name;
+ EXEC SQL FETCH csr240 INTO :name;
if (sqlca.sqlcode)
break;
printf("Printer %s, non-existant lpc ACL %d in printers table\n",
name, iid);
}
- EXEC SQL CLOSE csr236;
+ EXEC SQL CLOSE csr240;
return found;
}
-void fix_printer_ac(int id)
+void fix_printer_ac(void *id)
{
EXEC SQL BEGIN DECLARE SECTION;
int rowcount, iid = (int)id;
modified("printers");
}
-void fix_printer_lpc_acl(int id)
+void fix_printer_lpc_acl(void *id)
{
EXEC SQL BEGIN DECLARE SECTION;
int rowcount, iid = (int)id;
return found;
}
-int show_pdm_mach(void *id)
-{
- EXEC SQL BEGIN DECLARE SECTION;
- char name[PALLADIUM_NAME_SIZE];
- int iid = (int)id;
- EXEC SQL END DECLARE SECTION;
- int found = 1;
-
- EXEC SQL DECLARE csr220 CURSOR FOR
- SELECT name FROM palladium
- WHERE mach_id = :iid;
- EXEC SQL OPEN csr220;
- while (1)
- {
- EXEC SQL FETCH csr220 INTO :name;
- if (sqlca.sqlcode)
- break;
-
- strtrim(name);
- printf("Palladium server/supervisor %s is on non-existant machine %d\n",
- name, iid);
- found = 0;
- }
- EXEC SQL CLOSE csr220;
- return found;
-}
-
-
void phase2(void)
{
struct save_queue *sq, *sq1, *sq2, *sq3, *sq4, *sq5;
while (1)
{
EXEC SQL BEGIN DECLARE SECTION;
- int mach_id, loghost, rm, rq, ac, lpc_acl, modby
+ int mach_id, loghost, rm, rq, ac, lpc_acl, modby;
EXEC SQL END DECLARE SECTION;
EXEC SQL FETCH csr233 INTO :mach_id, :loghost, :rm, :rq,
if (!hash_lookup(machines, loghost))
{
show_printer_loghost((void *)loghost);
- cantfix();
+ cant_fix();
}
+ }
}
EXEC SQL CLOSE csr233;
generic_delete(sq1, show_printer_mach, "printers", "mach_id", 1);
generic_fix(sq4, show_printer_ac, "Clear", fix_printer_ac, 1);
generic_fix(sq5, show_printer_lpc_acl, "Clear", fix_printer_lpc_acl, 1);
}
+