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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2451 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch
2013-01-07 21:35:09 +00:00
parent 30b0acd4dc
commit 2cefc3569b

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))
{