mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fhem.pl: TRy to fix undefined device (Forum #58090)
git-svn-id: https://svn.fhem.de/fhem/trunk@12710 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d6bfaf5e47
commit
70f1eb6306
10
fhem/fhem.pl
10
fhem/fhem.pl
@ -3432,6 +3432,7 @@ Dispatch($$$)
|
|||||||
return rejectDuplicate($name,$idx,$addvals) if($isdup);
|
return rejectDuplicate($name,$idx,$addvals) if($isdup);
|
||||||
|
|
||||||
my @found;
|
my @found;
|
||||||
|
my $parserMod="";
|
||||||
my $clientArray = $hash->{".clientArray"};
|
my $clientArray = $hash->{".clientArray"};
|
||||||
$clientArray = computeClientArray($hash, $module) if(!$clientArray);
|
$clientArray = computeClientArray($hash, $module) if(!$clientArray);
|
||||||
|
|
||||||
@ -3447,6 +3448,7 @@ Dispatch($$$)
|
|||||||
no strict "refs"; $readingsUpdateDelayTrigger = 1;
|
no strict "refs"; $readingsUpdateDelayTrigger = 1;
|
||||||
@found = &{$modules{$m}{ParseFn}}($hash,$dmsg);
|
@found = &{$modules{$m}{ParseFn}}($hash,$dmsg);
|
||||||
use strict "refs"; $readingsUpdateDelayTrigger = 0;
|
use strict "refs"; $readingsUpdateDelayTrigger = 0;
|
||||||
|
$parserMod = $m;
|
||||||
last if(int(@found));
|
last if(int(@found));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3464,6 +3466,7 @@ Dispatch($$$)
|
|||||||
no strict "refs"; $readingsUpdateDelayTrigger = 1;
|
no strict "refs"; $readingsUpdateDelayTrigger = 1;
|
||||||
@found = &{$modules{$mname}{ParseFn}}($hash,$dmsg);
|
@found = &{$modules{$mname}{ParseFn}}($hash,$dmsg);
|
||||||
use strict "refs"; $readingsUpdateDelayTrigger = 0;
|
use strict "refs"; $readingsUpdateDelayTrigger = 0;
|
||||||
|
$parserMod = $mname;
|
||||||
last if(defined($found[0]));
|
last if(defined($found[0]));
|
||||||
} else {
|
} else {
|
||||||
Log 0, "ERROR: Cannot autoload $mname";
|
Log 0, "ERROR: Cannot autoload $mname";
|
||||||
@ -3524,9 +3527,12 @@ Dispatch($$$)
|
|||||||
$defs{$found}{LASTInputDev} = $name;
|
$defs{$found}{LASTInputDev} = $name;
|
||||||
}
|
}
|
||||||
delete($defs{$found}{".noDispatchVars"});
|
delete($defs{$found}{".noDispatchVars"});
|
||||||
|
DoTrigger($found, undef);
|
||||||
|
} else {
|
||||||
|
Log 1, "ERROR: >$found< returned by the $parserMod ParseFn is invalid,".
|
||||||
|
" notfy the module maintainer";
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoTrigger($found, undef);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user