fhem.pl: Optional function in RemoveInternalTimer (Forum #50265)

git-svn-id: https://svn.fhem.de/fhem/trunk@10995 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2016-03-05 15:38:39 +00:00
parent da732762d5
commit 1d0b93e275

View File

@@ -82,7 +82,7 @@ sub ReadingsNum($$$);
sub ReadingsTimestamp($$$);
sub ReadingsVal($$$);
sub RefreshAuthList();
sub RemoveInternalTimer($);
sub RemoveInternalTimer($;$);
sub ReplaceEventMap($$$);
sub ResolveDateWildcards($@);
sub SemicolonEscape($);
@@ -2794,11 +2794,12 @@ InternalTimer($$$$)
}
sub
RemoveInternalTimer($)
RemoveInternalTimer($;$)
{
my ($arg) = @_;
my ($arg, $fn) = @_;
foreach my $a (keys %intAt) {
delete($intAt{$a}) if($intAt{$a}{ARG} eq $arg);
delete($intAt{$a}) if($intAt{$a}{ARG} eq $arg &&
(!$fn || $intAt{$a}{FN} eq $fn));
}
}