Some debugging to track packet names created for sending

This commit is contained in:
Deon George
2022-01-20 22:47:44 +11:00
parent 421cd565bd
commit 98c9b880d4
3 changed files with 10 additions and 3 deletions

View File

@@ -863,6 +863,7 @@ final class Binkp extends BaseProtocol
} else {
$this->sessionClear(self::SE_WAITGET);
Log::debug(sprintf('%s:Sending packet [%s] as [%s]',self::LOGKEY,$this->send->name,$this->send->sendas));
$this->msgs(self::BPM_FILE,sprintf('%s %lu %ld %lu',$this->send->sendas,$this->send->size,$this->send->mtime,$file['offs']));
}
@@ -894,14 +895,17 @@ final class Binkp extends BaseProtocol
&& $this->send->mtime == Arr::get($file,'file.mtime')
&& $this->send->size == Arr::get($file,'file.size'))
{
// @todo Commit our mail transaction if the remote end confirmed receipt of the file.
if ($this->sessionGet(self::SE_SENDFILE)) {
$this->send->close(TRUE);
Log::debug(sprintf('%s:Packet [%s] sent. (%s)',self::LOGKEY,$this->send->sendas,$this->send->name));
$this->sessionClear(self::SE_SENDFILE);
$this->send->close(TRUE);
return 1;
}
if ($this->sessionGet(self::SE_WAITGOT)) {
Log::debug(sprintf('%s:Packet [%s] sent. (%s)',self::LOGKEY,$this->send->sendas,$this->send->name));
$this->sessionClear(self::SE_WAITGOT);
$this->send->close(TRUE);