mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
MYSENSORS_DEVICE: fix crash on unmapped C_REQ-message
git-svn-id: https://svn.fhem.de/fhem/trunk@6934 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e880754dfd
commit
39bfb299ce
@ -426,13 +426,16 @@ sub onSetMessage($$) {
|
||||
sub onRequestMessage($$) {
|
||||
my ($hash,$msg) = @_;
|
||||
|
||||
my ($readingname,$val) = rawToMappedReading($hash, $msg->{subType}, $msg->{childId}, $msg->{payload});
|
||||
sendClientMessage($hash,
|
||||
childId => $msg->{childId},
|
||||
cmd => C_SET,
|
||||
subType => $msg->{subType},
|
||||
payload => ReadingsVal($hash->{NAME},$readingname,$val)
|
||||
);
|
||||
eval {
|
||||
my ($readingname,$val) = rawToMappedReading($hash, $msg->{subType}, $msg->{childId}, $msg->{payload});
|
||||
sendClientMessage($hash,
|
||||
childId => $msg->{childId},
|
||||
cmd => C_SET,
|
||||
subType => $msg->{subType},
|
||||
payload => ReadingsVal($hash->{NAME},$readingname,$val)
|
||||
);
|
||||
};
|
||||
Log3 ($hash->{NAME},4,"MYSENSORS_DEVICE $hash->{NAME}: ignoring C_REQ-message ".GP_Catch($@)) if $@;
|
||||
}
|
||||
|
||||
sub onInternalMessage($$) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user