Fix für ping Modul

Begonnen von jki, 10 Januar 2021, 11:43:34

Vorheriges Thema - Nächstes Thema

jki

Hi!

wie werde ich folgenden Fix "los", sprich wie ist der Contribution Process hier?


From: Jan Kiszka <jan.kiszka@web.de>

The same timeout is used for both BlockingCall and Net::Ping itself.
That leads to random results, often the BlockingCall terminating Ping
first. And that causes the state to stay unchanged.

Fix this by using a one second longer timeout for BlockingCall, just as
fallback.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
fhem/FHEM/98_ping.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fhem/FHEM/98_ping.pm b/fhem/FHEM/98_ping.pm
index b90f38294..e726a829a 100644
--- a/fhem/FHEM/98_ping.pm
+++ b/fhem/FHEM/98_ping.pm
@@ -146,7 +146,7 @@ sub ping_Start($)

   if (!(exists($hash->{helper}{RUNNING_PID}))) {
     $hash->{helper}{RUNNING_PID} =
-          BlockingCall($blockingFn, $arg, $finishFn, $timeout, $abortFn, $hash);
+          BlockingCall($blockingFn, $arg, $finishFn, $timeout + 1, $abortFn, $hash);
   } else {
     Log3 $hash, 3, "$hash->{NAME} Blocking Call running no new started";
     ping_SetNextTimer($hash);
--
2.26.2



Jan

Wzut

Guckst du in /opt/fhem/MAINTAINER.txt :
Zitat von: MAINTAINER.txtFHEM/98_ping                 mattwire             Sonstiges

ergo : bitte Beitrag verschieben ins Unterforum Sonstiges : https://forum.fhem.de/index.php/board,46.0.html

Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

jki

OK, danke, die Spalte "Forum" hatte ich übersehen.

Ich suche aber auch noch nach einer CONTRIBUTING.txt oder. https://svn.fhem.de/#readwrite beschreibt, wie man gleich Entwickler wird, leider nicht, wie man nur Patches beisteuert.

Wzut

ganz simpel : so wie du es jetzt gemacht hast ( nur halt im richtigen Unterforum ) bzw bei manchen Modulen steht in der MAINTAINER.txt auch noch der passend Thread oder andere Extrawürste wie eine zusätzliche PN.
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher