From b246f0051fdded117eaad644043908138d6be958 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 18 Oct 2021 23:08:08 +1100 Subject: [PATCH] Fix polling, presenting our address. Fix logging address. --- app/Classes/Protocol.php | 4 ++-- app/Jobs/AddressPoll.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Classes/Protocol.php b/app/Classes/Protocol.php index 66bf314..42cd6a2 100644 --- a/app/Classes/Protocol.php +++ b/app/Classes/Protocol.php @@ -193,7 +193,7 @@ abstract class Protocol if ($this->setup->optionGet(Setup::O_HIDEAKA)) { $addresses = collect(); - foreach ($this->node->aka_remote as $ao) + foreach (($this->originate ? $this->node->aka_remote_authed : $this->node->aka_remote) as $ao) $addresses = $addresses->merge($this->setup->system->match($ao->zone)); $addresses = $addresses->unique(); @@ -221,7 +221,7 @@ abstract class Protocol public function session(int $type,SocketClient $client,Address $o=NULL): int { if ($o->exists) - Log::withContext(['ftn'=>$o->address]); + Log::withContext(['ftn'=>$o->ftn]); Log::debug(sprintf('%s:+ Start [%d]',self::LOGKEY,$type)); diff --git a/app/Jobs/AddressPoll.php b/app/Jobs/AddressPoll.php index 125cb0e..4072ab5 100644 --- a/app/Jobs/AddressPoll.php +++ b/app/Jobs/AddressPoll.php @@ -34,7 +34,7 @@ class AddressPoll implements ShouldQueue public function handle() { if ((! $this->ao->system->mailer_address) || (! $this->ao->system->mailer_port)) - throw new \Exception(sprintf('Unable to poll [%s] missing mailer details',$this->argument('ftn'))); + throw new \Exception(sprintf('Unable to poll [%s] missing mailer details',$this->ao->ftn)); try { $client = SocketClient::create($this->ao->system->mailer_address,$this->ao->system->mailer_port);