Made pending task separate entity rather than (bogus) reference to original.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@202 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2002-12-15 14:41:41 +00:00
parent dd4a8c90d3
commit dbd233999e
1 changed files with 3 additions and 3 deletions

View File

@ -422,15 +422,15 @@ sub addPendingTask
}
}
my $pending_task = { monitor=>$task->{monitor}, function=>$task->{function} };
my $end_time = time() + $task->{limit};
my $pending_list = $pending_tasks{$end_time};
if ( !$pending_list )
{
$pending_list = $pending_tasks{$end_time} = [];
}
$task->{function} =~ s/start/stop/;
delete( $task->{limit} );
push( @$pending_list, $task );
$pending_task->{function} =~ s/start/stop/;
push( @$pending_list, $pending_task );
}
sub processTask