mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 01:14:19 +00:00
fix: warnings
git-svn-id: https://svn.fhem.de/fhem/trunk@9161 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b6f8484872
commit
2910939e3e
@ -173,18 +173,20 @@ SYSMON_Define($$)
|
||||
delete($hash->{HOST});
|
||||
delete($hash->{USER});
|
||||
# erkennen, wenn User angegeben ist
|
||||
my($user,$th) = split(/@/,$host);
|
||||
if(defined($th)) {
|
||||
$hash->{USER} = lc($user);
|
||||
$host = $th;
|
||||
if($host) {
|
||||
my($user,$th) = split(/@/,$host);
|
||||
if(defined($th)) {
|
||||
$hash->{USER} = lc($user);
|
||||
$host = $th;
|
||||
}
|
||||
$hash->{HOST} = lc($host) if(defined($host));
|
||||
# DefaultPort je nach Protokol
|
||||
if(!defined($port)) {
|
||||
$port = '23' if($mode eq 'telnet');
|
||||
$port = '22' if($mode eq 'ssh');
|
||||
}
|
||||
$hash->{PORT} = lc($port);
|
||||
}
|
||||
$hash->{HOST} = lc($host) if(defined($host));
|
||||
# DefaultPort je nach Protokol
|
||||
if(!defined($port)) {
|
||||
$port = '23' if($mode eq 'telnet');
|
||||
$port = '22' if($mode eq 'ssh');
|
||||
}
|
||||
$hash->{PORT} = lc($port);
|
||||
} else {
|
||||
return "unexpected mode. use local or telnet only."; # TODO: SSH
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user