From 33a95d7540c689facd7abfc3446d9ef276404602 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 28 Mar 2022 08:56:05 +0000 Subject: [PATCH] fhem.pl: allow sending large updates (Forum #126946) git-svn-id: https://svn.fhem.de/fhem/trunk@25891 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index b85dedfa2..e963e9cca 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -297,6 +297,7 @@ my $readingsUpdateDelayTrigger; # needed internally my $gotSig; # non-undef if got a signal my %oldvalue; # Old values, see commandref.html my $wbName = ".WRITEBUFFER"; # Buffer-name for delayed writing via select +my $wbPartial = ".PARTIALWRITE";# Partial-Write name, #126946 my %comments; # Comments from the include files my %duplicate; # Pool of received msg for multi-fhz/cul setups my @cmdList; # Remaining commands in a chain. Used by sleep @@ -819,6 +820,7 @@ while (1) { } else { if($ret >= length($wb)) { # for the > see Forum #29963 delete($hash->{$wbName}); + delete($hash->{$wbPartial}); if($hash->{WBCallback}) { no strict "refs"; my $ret = &{$hash->{WBCallback}}($hash); @@ -827,6 +829,7 @@ while (1) { } } else { $hash->{$wbName} = substr($wb, $ret); + $hash->{$wbPartial} = 1; } } } @@ -5534,7 +5537,7 @@ addToWritebuffer($$@) $hash->{WBCallback} = $callback; if(!defined($hash->{$wbName})) { $hash->{$wbName} = $txt; - } elsif($nolimit || length($hash->{$wbName}) < 1024000) { + } elsif($nolimit || length($hash->{$wbName}) < 1024000 || !$hash->{$wbPartial}) { $hash->{$wbName} .= $txt; } else { return 0;