From bbe785d8ca0025f6e66eb5c9f19b79b79a90f6ef Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Sat, 5 Mar 2016 15:38:39 +0000 Subject: [PATCH] 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 --- fhem/fhem.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index adb552c48..4405b67ec 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -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)); } }