2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 17:36:39 +00:00

00_HMUARTLGW.pm: improve support for old perl versions

git-svn-id: https://svn.fhem.de/fhem/trunk@12433 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgernoth 2016-10-26 08:36:40 +00:00
parent 4f72f17462
commit a08b6a162e

View File

@ -2069,8 +2069,10 @@ sub HMUARTLGW_sendAscii($$)
$msg = sprintf($msg, $hash->{CNT});
my $logmsg = $msg;
$logmsg =~ s/\r\n$//;
Log3($hash, HMUARTLGW_getVerbLvl($hash, undef, undef, 5),
"HMUARTLGW ${name} send (".length($msg)."): ". $msg =~ s/\r\n//r);
"HMUARTLGW ${name} send (".length($logmsg)."): ". $logmsg);
$msg = HMUARTLGW_encrypt($hash, $msg) if ($hash->{crypto} && !($msg =~ m/^V/));
$hash->{CNT} = ($hash->{CNT} + 1) & 0xff;