EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
/* get locks */
- EXEC SQL SELECT modtime INTO :buf FROM list WHERE LIST_ID = 0;
+ EXEC SQL SELECT modtime INTO :buf FROM imembers WHERE list_id = 0;
EXEC SQL SELECT modtime INTO :buf FROM users WHERE USERS_ID = 0;
+ EXEC SQL SELECT modtime INTO :buf FROM machine WHERE mach_id = 0;
+ EXEC SQL SELECT modtime INTO :buf FROM list WHERE LIST_ID = 0;
fprintf(stderr, "Loading machines\n");
machines = create_hash(1000);
EXEC SQL DECLARE m_cursor CURSOR FOR
SELECT mach_id, name
- FROM machine
+ FROM machine WHERE mach_id != 0
ORDER BY mach_id;
EXEC SQL OPEN m_cursor;
while (1) {
EXEC SQL DECLARE l_cursor CURSOR FOR
SELECT list_id, name, maillist, description, acl_type, acl_id
- FROM list WHERE active != 0
+ FROM list WHERE active != 0 AND list_id != 0
ORDER BY list_id;
EXEC SQL OPEN l_cursor;
while (1) {
while (1) {
EXEC SQL FETCH mem_cursor INTO :id, :type, :mid;
if (sqlca.sqlcode != 0) break;
+ if (id == 0)
+ continue;
if (l = (struct list *) hash_lookup(lists, id)) {
m = (struct member *) malloc(sizeof(struct member));
if (type[0] == 'U' &&
(void) fputc('\n', aliases);
}
+
+
+