From 4502984312d6a22616d9361d192694ac5f4a3de6 Mon Sep 17 00:00:00 2001 From: Sailor <> Date: Mon, 1 May 2017 08:56:42 +0000 Subject: [PATCH] 73_km200.pm: bugfix: Errorlist unsorted timestamp part 2 git-svn-id: https://svn.fhem.de/fhem/trunk@14151 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_km200.pm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fhem/FHEM/73_km200.pm b/fhem/FHEM/73_km200.pm index 499395174..ed3b5710a 100644 --- a/fhem/FHEM/73_km200.pm +++ b/fhem/FHEM/73_km200.pm @@ -1777,8 +1777,9 @@ sub km200_GetSingleService($) my $TempErrorList = ""; ### Sort list by timestamps descending - my @TempSortedErrorList = sort { $b->{t} <=> $a->{t} } @{ $json->{values} }; - + my @TempSortedErrorList = sort { $b->{t} cmp $a->{t} } @{ $json->{values} }; +# my @TempSortedErrorList = @{ $json->{values} } ; + ### For every notification do foreach my $item (@TempSortedErrorList) { @@ -2331,10 +2332,9 @@ sub km200_ParseHttpResponseInit($) ### Sort list by timestamps descending my $TempServiceIndex = 0; -# my @TempSortedErrorList = sort { $b->{t} <=> $a->{t} } @{ $json->{values} }; - my @TempSortedErrorList = sort ( @{ $json->{values} } ); - - + my @TempSortedErrorList = sort { $b->{t} cmp $a->{t} } @{ $json->{values} }; +# my @TempSortedErrorList = @{ $json->{values} }; + foreach my $item (@TempSortedErrorList) { ### Increment Service-Index @@ -2830,9 +2830,8 @@ sub km200_ParseHttpResponseDyn($) ### Sort list by timestamps descending my @TempSortedErrorList = sort { $b->{t} cmp $a->{t} } @{ $json->{values} }; - my @TempSortedErrorList = sort ( @{ $json->{values} } ); - - +# my @TempSortedErrorList = @{ $json->{values} } ; + ### For every notification do foreach my $item (@TempSortedErrorList) {