Transfering netmail via EMSI
This commit is contained in:
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use App\Classes\Protocol as BaseProtocol;
|
||||
use App\Classes\Sock\SocketClient;
|
||||
use App\Classes\Sock\SocketException;
|
||||
use App\Models\Address;
|
||||
use App\Models\{Address,Setup};
|
||||
use App\Interfaces\CRC as CRCInterface;
|
||||
use App\Interfaces\Zmodem as ZmodemInterface;
|
||||
use App\Traits\CRC as CRCTrait;
|
||||
@@ -82,7 +82,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
if (! parent::onConnect($client)) {
|
||||
$this->session(self::SESSION_AUTO,$client,(new Address));
|
||||
$this->client->close();
|
||||
Log::info(sprintf('%s: = End - Connection closed [%s]',__METHOD__,$client->getAddress()));
|
||||
Log::info(sprintf('%s: = End - Connection closed [%s]',__METHOD__,$client->address_remote));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -191,7 +191,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
|
||||
// Mailer Details
|
||||
$makedata .= sprintf('{%s}{%s}{%s}{%s}',
|
||||
self::product_code,
|
||||
Setup::product_id(),
|
||||
config('app.name'),
|
||||
$this->setup->version,
|
||||
'#000000' // Serial Numbers
|
||||
@@ -346,7 +346,12 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
} else {
|
||||
$this->node->optionSet(self::O_PWD);
|
||||
Log::info(sprintf('%s: - Remote Authed [%d] AKAs',__METHOD__,$c));
|
||||
$this->send->add('/tmp/aa');
|
||||
|
||||
// Add our mail to the queue if we have authenticated
|
||||
if ($this->node->aka_authed)
|
||||
foreach ($this->node->aka_remote as $ao) {
|
||||
$this->send->mail($ao);
|
||||
}
|
||||
}
|
||||
|
||||
/* Link codes */
|
||||
@@ -961,9 +966,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
if ($rc < 0)
|
||||
return (self::S_REDIAL|self::S_ADDTRY);
|
||||
|
||||
Log::info(sprintf('%s: - Starting outbound EMSI session to [%s]',__METHOD__,$this->client->getAddress()));
|
||||
|
||||
// @todo Lock Node AKAs
|
||||
Log::info(sprintf('%s: - Starting outbound EMSI session to [%s]',__METHOD__,$this->client->address_remote));
|
||||
|
||||
// Inbound session
|
||||
} else {
|
||||
@@ -975,9 +978,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
return (self::S_REDIAL|self::S_ADDTRY);
|
||||
}
|
||||
|
||||
Log::info(sprintf('%s: - Starting inbound EMSI session from [%s]',__METHOD__,$this->client->getAddress()));
|
||||
|
||||
// @todo Lock Node AKAs
|
||||
Log::info(sprintf('%s: - Starting inbound EMSI session from [%s]',__METHOD__,$this->client->address_remote));
|
||||
|
||||
if ($this->node->aka_authed) {
|
||||
$xproto = $this->is_freq_available();
|
||||
@@ -1003,6 +1004,8 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
return (self::S_REDIAL|self::S_ADDTRY);
|
||||
}
|
||||
|
||||
// @todo Lock Node AKAs
|
||||
|
||||
Log::info(sprintf('%s: - We have %lu%s mail, %lu%s files',__METHOD__,$this->send->mail_size,'b',$this->send->file_size,'b'));
|
||||
|
||||
$proto = $this->originate ? $this->node->optionGet(self::P_MASK) : $this->optionGet(self::P_MASK);
|
||||
@@ -1172,6 +1175,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
if (! $z->zmodem_sendinit($this->client,$zap) && $this->send->total_count)
|
||||
$z->zmodem_sendfile($this->send);
|
||||
|
||||
Log::debug(sprintf('%s: - Finished sending',__METHOD__));
|
||||
return ($z->zmodem_senddone()<0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user