mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 18:56:03 +00:00
fhem.pl: allow sending large updates (Forum #126946)
git-svn-id: https://svn.fhem.de/fhem/trunk@25891 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c7704c765
commit
33a95d7540
@ -297,6 +297,7 @@ my $readingsUpdateDelayTrigger; # needed internally
|
|||||||
my $gotSig; # non-undef if got a signal
|
my $gotSig; # non-undef if got a signal
|
||||||
my %oldvalue; # Old values, see commandref.html
|
my %oldvalue; # Old values, see commandref.html
|
||||||
my $wbName = ".WRITEBUFFER"; # Buffer-name for delayed writing via select
|
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 %comments; # Comments from the include files
|
||||||
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
||||||
my @cmdList; # Remaining commands in a chain. Used by sleep
|
my @cmdList; # Remaining commands in a chain. Used by sleep
|
||||||
@ -819,6 +820,7 @@ while (1) {
|
|||||||
} else {
|
} else {
|
||||||
if($ret >= length($wb)) { # for the > see Forum #29963
|
if($ret >= length($wb)) { # for the > see Forum #29963
|
||||||
delete($hash->{$wbName});
|
delete($hash->{$wbName});
|
||||||
|
delete($hash->{$wbPartial});
|
||||||
if($hash->{WBCallback}) {
|
if($hash->{WBCallback}) {
|
||||||
no strict "refs";
|
no strict "refs";
|
||||||
my $ret = &{$hash->{WBCallback}}($hash);
|
my $ret = &{$hash->{WBCallback}}($hash);
|
||||||
@ -827,6 +829,7 @@ while (1) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$hash->{$wbName} = substr($wb, $ret);
|
$hash->{$wbName} = substr($wb, $ret);
|
||||||
|
$hash->{$wbPartial} = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5534,7 +5537,7 @@ addToWritebuffer($$@)
|
|||||||
$hash->{WBCallback} = $callback;
|
$hash->{WBCallback} = $callback;
|
||||||
if(!defined($hash->{$wbName})) {
|
if(!defined($hash->{$wbName})) {
|
||||||
$hash->{$wbName} = $txt;
|
$hash->{$wbName} = $txt;
|
||||||
} elsif($nolimit || length($hash->{$wbName}) < 1024000) {
|
} elsif($nolimit || length($hash->{$wbName}) < 1024000 || !$hash->{$wbPartial}) {
|
||||||
$hash->{$wbName} .= $txt;
|
$hash->{$wbName} .= $txt;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user