From 60b84fb56eeeee7ad26ed13f16b33532f16f0e79 Mon Sep 17 00:00:00 2001 From: delmar <> Date: Wed, 30 Oct 2019 21:09:41 +0000 Subject: [PATCH] 70_CanOverEthernet: module crashed when UDP port was occupied git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20428 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- CHANGED | 1 + FHEM/70_CanOverEthernet.pm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGED b/CHANGED index 4058b48c4..97639290b 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 70_CanOverEthernet: module crashed when UDP port was occupied - feature: 98_weekprofile: add reading topics - a list of topic names - change: 57_Calendar: new attribute, cutoffLaterThan; events without DURATION and DTEND last 1 day; several fixes (see diff --git a/FHEM/70_CanOverEthernet.pm b/FHEM/70_CanOverEthernet.pm index 718d223a3..8032a5fb0 100644 --- a/FHEM/70_CanOverEthernet.pm +++ b/FHEM/70_CanOverEthernet.pm @@ -72,6 +72,9 @@ sub CanOverEthernet_Define($$) { my $portno = 5441; my $conn = IO::Socket::INET->new(Proto=>"udp",LocalPort=>$portno); + + Log3 $name, 0, "CanOverEthernet ($name) - ERROR: Unable to open port 5441 for reading." + unless defined ($conn); $hash->{FD} = $conn->fileno(); $hash->{CD} = $conn;