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:
parent
dd4a8c90d3
commit
dbd233999e
|
@ -422,15 +422,15 @@ sub addPendingTask
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $pending_task = { monitor=>$task->{monitor}, function=>$task->{function} };
|
||||||
my $end_time = time() + $task->{limit};
|
my $end_time = time() + $task->{limit};
|
||||||
my $pending_list = $pending_tasks{$end_time};
|
my $pending_list = $pending_tasks{$end_time};
|
||||||
if ( !$pending_list )
|
if ( !$pending_list )
|
||||||
{
|
{
|
||||||
$pending_list = $pending_tasks{$end_time} = [];
|
$pending_list = $pending_tasks{$end_time} = [];
|
||||||
}
|
}
|
||||||
$task->{function} =~ s/start/stop/;
|
$pending_task->{function} =~ s/start/stop/;
|
||||||
delete( $task->{limit} );
|
push( @$pending_list, $pending_task );
|
||||||
push( @$pending_list, $task );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub processTask
|
sub processTask
|
||||||
|
|
Loading…
Reference in New Issue