2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

Avoid undefined messages when reattaching a device with baudrate specified

git-svn-id: https://svn.fhem.de/fhem/trunk@818 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2011-01-30 10:25:49 +00:00
parent 6e4cdd1b0e
commit e8e81120c8

View File

@ -995,6 +995,8 @@ CUL_OpenDev($$)
my $dev = $hash->{DeviceName};
my $name = $hash->{NAME};
my $po;
my $baudrate;
($dev, $baudrate) = split("@", $dev);
$hash->{PARTIAL} = "";
@ -1030,8 +1032,6 @@ CUL_OpenDev($$)
} else { # USB/Serial device
my $baudrate;
($dev, $baudrate) = split("@", $dev);
if ($^O=~/Win/) {
require Win32::SerialPort;
@ -1113,6 +1113,8 @@ CUL_Disconnected($)
my $hash = shift;
my $dev = $hash->{DeviceName};
my $name = $hash->{NAME};
my $baudrate;
($dev, $baudrate) = split("@", $dev);
return if(!defined($hash->{FD})); # Already deleted or RFR