From d1bfa3a035961566a1c63918b14ebf8137e5494b Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 6 Feb 2022 20:21:35 +1100 Subject: [PATCH] Fix for trying to receive a new file, when the previous file open failed with a permission denied --- app/Classes/Node.php | 2 +- app/Classes/Protocol/Binkp.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Classes/Node.php b/app/Classes/Node.php index cacd546..8effdaf 100644 --- a/app/Classes/Node.php +++ b/app/Classes/Node.php @@ -179,7 +179,7 @@ class Node } } - Log::debug(sprintf('%s:= auth [%d]',self::LOGKEY,$this->ftns_authed->count())); + Log::debug(sprintf('%s:= auth, we authed [%d] addresses',self::LOGKEY,$this->ftns_authed->count())); return $this->ftns_authed->count(); } diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index 77a6d5f..1bdf811 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -835,6 +835,10 @@ final class Binkp extends BaseProtocol Log::error(sprintf('%s: ! File Open ERROR [%s]',self::LOGKEY,$e->getMessage())); $this->msgs(self::BPM_SKIP,$this->recv->name_size_time); + + // Close the file, since we had an error opening it. + if ($this->recv->fd) + $this->recv->close(); } return 1;