From 306d1aac31dfb438874fae3ca6403ce6c96e7e25 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 18 Nov 2019 17:50:17 +0000 Subject: [PATCH] 49_SSCam: FHEM crash when sending data by telegramBot Forum:#105486 git-svn-id: https://svn.fhem.de/fhem/trunk@20534 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/49_SSCam.pm | 3 ++- fhem/contrib/DS_Starter/49_SSCam.pm | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 425635196..725b9e5dd 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 49_SSCam: FHEM crash when sending data by telegramBot Forum:#105486 - bugfix: 98_WeekTimer: fixed deletion of delayed timers (#104272) - bugfix: 73_AutoShuttersControl: fix brightness morning drive in with roommate condition diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm index 2ee617fc0..5013dcc8d 100644 --- a/fhem/FHEM/49_SSCam.pm +++ b/fhem/FHEM/49_SSCam.pm @@ -54,6 +54,7 @@ eval "use Cache::Cache;1;" or my $SScamMMCacheCache = "Cache::Cache"; # Versions History intern our %SSCam_vNotesIntern = ( + "9.0.4" => "18.11.2019 fix FHEM crash when sending data by telegramBot, Forum: https://forum.fhem.de/index.php/topic,105486.0.html ", "9.0.3" => "04.11.2019 change send Telegram routines, undef variables, fix cache and transaction coding, fix sendEmailblocking ", "9.0.2" => "03.11.2019 change Streamdev type \"lastsnap\" use \$data Hash or CHI cache ", "9.0.1" => "02.11.2019 correct snapgallery number of snaps in case of cache usage, fix display number of retrieved snaps ", @@ -8813,7 +8814,7 @@ sub SSCam_TBotSendIt($$$$$$$;$$$) { $hash->{sentMsgOptions} = $options; # init param hash - # $hash->{HU_DO_PARAMS}->{hash} = $hash; + $hash->{HU_DO_PARAMS}->{hash} = $hash; $hash->{HU_DO_PARAMS}->{header} = $SSCam_TBotHeader; delete $hash->{HU_DO_PARAMS}{args}; delete $hash->{HU_DO_PARAMS}{boundary}; diff --git a/fhem/contrib/DS_Starter/49_SSCam.pm b/fhem/contrib/DS_Starter/49_SSCam.pm index 9959332b7..bc365ddd4 100644 --- a/fhem/contrib/DS_Starter/49_SSCam.pm +++ b/fhem/contrib/DS_Starter/49_SSCam.pm @@ -1,5 +1,5 @@ ######################################################################################################################## -# $Id: 49_SSCam.pm 20353 2019-10-12 05:50:49Z DS_Starter $ +# $Id: 49_SSCam.pm 20469 2019-11-06 22:58:20Z DS_Starter $ ######################################################################################################################### # 49_SSCam.pm # @@ -54,6 +54,7 @@ eval "use Cache::Cache;1;" or my $SScamMMCacheCache = "Cache::Cache"; # Versions History intern our %SSCam_vNotesIntern = ( + "9.0.4" => "18.11.2019 fix FHEM crash when sending data by telegramBot, Forum: https://forum.fhem.de/index.php/topic,105486.0.html ", "9.0.3" => "04.11.2019 change send Telegram routines, undef variables, fix cache and transaction coding, fix sendEmailblocking ", "9.0.2" => "03.11.2019 change Streamdev type \"lastsnap\" use \$data Hash or CHI cache ", "9.0.1" => "02.11.2019 correct snapgallery number of snaps in case of cache usage, fix display number of retrieved snaps ", @@ -8813,7 +8814,7 @@ sub SSCam_TBotSendIt($$$$$$$;$$$) { $hash->{sentMsgOptions} = $options; # init param hash - # $hash->{HU_DO_PARAMS}->{hash} = $hash; + $hash->{HU_DO_PARAMS}->{hash} = $hash; $hash->{HU_DO_PARAMS}->{header} = $SSCam_TBotHeader; delete $hash->{HU_DO_PARAMS}{args}; delete $hash->{HU_DO_PARAMS}{boundary}; @@ -9580,8 +9581,7 @@ sub SSCam_cleanData($;$) { my $hash = $defs{$name}; my $del = 0; - RemoveInternalTimer($hash, "SSCam_cleanData"); - #my $tac = $hash->{HELPER}{TRANSACTION}; + RemoveInternalTimer($hash, "SSCam_cleanData"); if($data{SSCam}{$name}{SENDCOUNT}{$tac} && $data{SSCam}{$name}{SENDCOUNT}{$tac} > 0) { # Cacheinhalt erst löschen wenn Sendezähler 0 InternalTimer(gettimeofday()+1, "SSCam_cleanData", "$name:$tac", 0); @@ -9942,12 +9942,12 @@ sub SSCam_setVersionInfo($) { if($modules{$type}{META}{x_prereqs_src} && !$hash->{HELPER}{MODMETAABSENT}) { # META-Daten sind vorhanden $modules{$type}{META}{version} = "v".$v; # Version aus META.json überschreiben, Anzeige mit {Dumper $modules{SMAPortal}{META}} - if($modules{$type}{META}{x_version}) { # {x_version} ( nur gesetzt wenn $Id: 49_SSCam.pm 20353 2019-10-12 05:50:49Z DS_Starter $ im Kopf komplett! vorhanden ) + if($modules{$type}{META}{x_version}) { # {x_version} ( nur gesetzt wenn $Id: 49_SSCam.pm 20469 2019-11-06 22:58:20Z DS_Starter $ im Kopf komplett! vorhanden ) $modules{$type}{META}{x_version} =~ s/1.1.1/$v/g; } else { $modules{$type}{META}{x_version} = $v; } - return $@ unless (FHEM::Meta::SetInternals($hash)); # FVERSION wird gesetzt ( nur gesetzt wenn $Id: 49_SSCam.pm 20353 2019-10-12 05:50:49Z DS_Starter $ im Kopf komplett! vorhanden ) + return $@ unless (FHEM::Meta::SetInternals($hash)); # FVERSION wird gesetzt ( nur gesetzt wenn $Id: 49_SSCam.pm 20469 2019-11-06 22:58:20Z DS_Starter $ im Kopf komplett! vorhanden ) if(__PACKAGE__ eq "FHEM::$type" || __PACKAGE__ eq $type) { # es wird mit Packages gearbeitet -> Perl übliche Modulversion setzen # mit {->VERSION()} im FHEMWEB kann Modulversion abgefragt werden