]> andersk Git - moira.git/commitdiff
duplicate the iu struct before putting it into the incremental queue, so
authorzacheiss <zacheiss>
Thu, 8 Jun 2000 19:10:04 +0000 (19:10 +0000)
committerzacheiss <zacheiss>
Thu, 8 Jun 2000 19:10:04 +0000 (19:10 +0000)
that we can schedule multiple different kinds of incrementals at the
same time.

server/increment.pc

index 30a559e78c31962f0c865cc0cad4923a6f170a4d..9117b396b43cdaf5cd3a472df6d60987f954d3aa 100644 (file)
@@ -345,7 +345,7 @@ void incremental_update(void)
   EXEC SQL BEGIN DECLARE SECTION;
   char tab[INCREMENTAL_TABLE_NAME_SIZE], serv[INCREMENTAL_SERVICE_SIZE];
   EXEC SQL END DECLARE SECTION;
-  struct iupdate *iu;
+  struct iupdate *iu, *iu_save;
 
   if (!inited)
     {
@@ -376,8 +376,14 @@ void incremental_update(void)
          if (!strcmp(c->table, iu->table))
            {
              iu->service = c->service;
-             sq_save_data(incremental_exec, iu);
-             break;
+             iu_save = xmalloc(sizeof(struct iupdate));
+             iu_save->service = iu->service;
+             iu_save->table = iu->table;
+             iu_save->beforec = iu->beforec;
+             iu_save->afterc = iu->afterc;
+             iu_save->before = copy_argv(iu->before, iu->beforec);
+             iu_save->after = copy_argv(iu->after, iu->afterc);
+             sq_save_data(incremental_exec, iu_save);
            }
        }
       if (!c)
This page took 0.085063 seconds and 5 git commands to generate.