fix bad race condition
authorMark Wells <mark@freeside.biz>
Thu, 13 Dec 2012 00:19:39 +0000 (16:19 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 13 Dec 2012 00:19:39 +0000 (16:19 -0800)
FS/FS/part_export/sqlradius.pm

index 7b3097e..58cc5be 100644 (file)
@@ -213,6 +213,7 @@ sub _export_replace {
           return $error;
         }
       }
+      $jobnum = $err_or_queue->jobnum; # chain all of these dependencies
     }
 
     my @del = grep { !exists $new{$_} } keys %old;
@@ -230,6 +231,7 @@ sub _export_replace {
           return $error;
         }
       }
+      $jobnum = $err_or_queue->jobnum; # chain all of these dependencies
     }
   }
 
@@ -561,6 +563,7 @@ sub sqlreplace_usergroups {
       my $error = $err_or_queue->depend_insert( $jobnum );
       return $error if $error;
     }
+    $jobnum = $err_or_queue->jobnum; # chain all of these dependencies
   }
 
   if ( @newgroups ) {