Fix polling, presenting our address. Fix logging address.

This commit is contained in:
Deon George 2021-10-18 23:08:08 +11:00
parent 83e06908b0
commit b246f0051f
2 changed files with 3 additions and 3 deletions

View File

@ -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));

View File

@ -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);