X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FMainLoop.swg;h=6b66c457b09f18d771e6b02a8978cc7116207a04;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=40c5c05407555d5c6e09de97495ce17acd781fbd;hpb=011a59f5a54864108a16af570a6b287410597cc2;p=debian%2Famanda diff --git a/perl/Amanda/MainLoop.swg b/perl/Amanda/MainLoop.swg index 40c5c05..6b66c45 100644 --- a/perl/Amanda/MainLoop.swg +++ b/perl/Amanda/MainLoop.swg @@ -262,6 +262,7 @@ push @EXPORT_OK, "synchronized"; sub define_steps (@) { my (%params) = @_; my $cb_ref = $params{'cb_ref'}; + my $finalize = $params{'finalize'}; my %steps; croak "cb_ref is undefined" unless defined $cb_ref; @@ -276,6 +277,7 @@ push @EXPORT_OK, "synchronized"; $$cb_ref = sub { %steps = (); $current_steps = undef; + $finalize->() if defined($finalize); goto $orig_cb; };