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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10995 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2016-03-05 15:38:39 +00:00
parent 5bb9083c51
commit bbe785d8ca

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));
}
}