2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 02:10:32 +00:00

don't log further error messages if device is still not reachable - part 2 of 2

git-svn-id: https://svn.fhem.de/fhem/trunk@2451 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2013-01-07 21:35:09 +00:00
parent b79d8940f2
commit 1b612f3aec

View File

@ -462,17 +462,18 @@ YAMAHA_AVR_Define($$)
#############################
sub
YAMAHA_AVR_SendCommand($$$)
YAMAHA_AVR_SendCommand($$@)
{
my($hash, $address, $command) = @_;
my ($hash, $address, $command, $loglevel) = @_;
my $name = $hash->{NAME};
my $response;
$loglevel = GetLogLevel($hash->{NAME}, 3) unless(defined($loglevel));
Log GetLogLevel($name, 5), "YAMAHA_AVR: execute on $name: $command";
# In case any URL changes must be made, this part is separated in this function".
$response = GetFileFromURL("http://".$address."/YamahaRemoteControl/ctrl", 10, "<?xml version=\"1.0\" encoding=\"utf-8\"?>".$command);
$response = CustomGetFileFromURL(0, "http://".$address."/YamahaRemoteControl/ctrl", 10, "<?xml version=\"1.0\" encoding=\"utf-8\"?>".$command, 1, ($hash->{helper}{AVAILABLE} ? $loglevel : 5));
unless(defined($response))
{