Compare commits

..

11 Commits

Author SHA1 Message Date
5312bee9bc Fix UDP services (ie: DNS)
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m34s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s
2024-11-26 17:03:59 +11:00
c0517c04f0 Exclude points when choosing what to remove from the net during nodelist processing 2024-11-26 15:13:35 +11:00
b5e76c77f8 Added filefix %LIST 2024-11-26 15:13:35 +11:00
b67ae28b98 Split out areafix command processing, implemented start of filefix 2024-11-26 15:13:35 +11:00
521a9b0679 Deprecate singleOrNew(), we use firstOrNew() instead 2024-11-26 15:13:35 +11:00
24144de193 Change NodelistImport display when using job:list 2024-11-26 15:13:35 +11:00
aabc8b5a65 Added ansitex font 2024-11-26 15:13:35 +11:00
1aabd323bb Remove unused config files 2024-11-26 15:13:35 +11:00
bf3fce252d Remove CommProtocolReceive commands, Remove protocol onConnect() functions, pass Setup::class to protocols 2024-11-26 15:13:35 +11:00
72ad1307c5 Deprecate singleOrFail() in favour of sole() 2024-11-26 15:13:35 +11:00
f0f2d74a14 Reduce the need for Mailer::class in protocols 2024-11-26 15:13:35 +11:00
2 changed files with 12 additions and 4 deletions

View File

@ -360,11 +360,11 @@ abstract class Protocol
* Setup a session with a remote client * Setup a session with a remote client
* *
* @param SocketClient $client Socket details of session * @param SocketClient $client Socket details of session
* @param Address|null $o If we have an address, we originated a session to this Address * @param Address $o If we have an address, we originated a session to this Address
* @return int * @return int
* @throws \Exception * @throws \Exception
*/ */
public function session(SocketClient $client,Address $o=NULL): int public function session(SocketClient $client,Address $o): int
{ {
if ($o->exists) if ($o->exists)
Log::withContext(['ftn'=>$o->ftn]); Log::withContext(['ftn'=>$o->ftn]);
@ -395,14 +395,17 @@ abstract class Protocol
} }
// We are an IP node // We are an IP node
$this->optionSet(self::O_TCP);
$this->client = $client; $this->client = $client;
// @todo This appears to be a bug in laravel? Need to call app()->isDownForMaintenance() twice?
app()->isDownForMaintenance();
$this->down = app()->isDownForMaintenance(); $this->down = app()->isDownForMaintenance();
switch (get_class($this)) { switch (get_class($this)) {
case EMSI::class: case EMSI::class:
Log::debug(sprintf('%s:- Starting EMSI',self::LOGKEY)); Log::debug(sprintf('%s:- Starting EMSI',self::LOGKEY));
$this->optionSet(self::O_TCP);
$rc = $this->protocol_init(); $rc = $this->protocol_init();
if ($rc < 0) { if ($rc < 0) {
Log::error(sprintf('%s:! Unable to start EMSI [%d]',self::LOGKEY,$rc)); Log::error(sprintf('%s:! Unable to start EMSI [%d]',self::LOGKEY,$rc));
@ -417,10 +420,14 @@ abstract class Protocol
case Binkp::class: case Binkp::class:
Log::debug(sprintf('%s:- Starting BINKP',self::LOGKEY)); Log::debug(sprintf('%s:- Starting BINKP',self::LOGKEY));
$this->optionSet(self::O_TCP);
$rc = $this->protocol_session($this->originate); $rc = $this->protocol_session($this->originate);
break; break;
case DNS::class:
return $this->protocol_session();
default: default:
Log::error(sprintf('%s:! Unsupported session type [%s]',self::LOGKEY,get_class($this))); Log::error(sprintf('%s:! Unsupported session type [%s]',self::LOGKEY,get_class($this)));

View File

@ -155,7 +155,8 @@ final class SocketServer {
$r = new SocketClient($this->server); $r = new SocketClient($this->server);
if ($r->hasData(30)) { if ($r->hasData(30)) {
$this->handler[0]->{$this->handler[1]}($r); if (! ($this->handler[0]->{$this->handler[1]}($r)))
exit(0);
// Sleep so our thread has a chance to pick up the data from our connection // Sleep so our thread has a chance to pick up the data from our connection
usleep(50000); usleep(50000);