Fix for 3b7ce4b, change where setup is defined for our protocols

This commit is contained in:
Deon George 2024-11-04 13:06:04 +11:00
parent 242f4013b1
commit 80fa3e840b
5 changed files with 8 additions and 8 deletions

View File

@ -137,7 +137,7 @@ abstract class Protocol
public function __construct() public function __construct()
{ {
$this->setup = Config::get('setup'); $this->setup = Config::get('setup',Setup::findOrFail(config('app.id')));
} }
/** /**

View File

@ -38,7 +38,7 @@ class CommBinkpReceive extends Command
$o = Setup::findOrFail(config('app.id')); $o = Setup::findOrFail(config('app.id'));
$server = new SocketServer($o->binkp_port,$o->binkp_bind); $server = new SocketServer($o->binkp_port,$o->binkp_bind);
$server->handler = [new Binkp($o),'onConnect']; $server->handler = [new Binkp,'onConnect'];
try { try {
$server->listen(); $server->listen();

View File

@ -38,7 +38,7 @@ class CommEMSIReceive extends Command
$o = Setup::findOrFail(config('app.id')); $o = Setup::findOrFail(config('app.id'));
$server = new SocketServer($o->emsi_port,$o->emsi_bind); $server = new SocketServer($o->emsi_port,$o->emsi_bind);
$server->handler = [new EMSI($o),'onConnect']; $server->handler = [new EMSI,'onConnect'];
try { try {
$server->listen(); $server->listen();

View File

@ -50,7 +50,7 @@ class ServerStart extends Command
'address'=>$o->binkp_bind, 'address'=>$o->binkp_bind,
'port'=>$o->binkp_port, 'port'=>$o->binkp_port,
'proto'=>SOCK_STREAM, 'proto'=>SOCK_STREAM,
'class'=>new Binkp($o), 'class'=>new Binkp,
]); ]);
if ($o->emsi_active) if ($o->emsi_active)
@ -58,7 +58,7 @@ class ServerStart extends Command
'address'=>$o->emsi_bind, 'address'=>$o->emsi_bind,
'port'=>$o->emsi_port, 'port'=>$o->emsi_port,
'proto'=>SOCK_STREAM, 'proto'=>SOCK_STREAM,
'class'=>new EMSI($o), 'class'=>new EMSI,
]); ]);
if ($o->dns_active) if ($o->dns_active)
@ -66,7 +66,7 @@ class ServerStart extends Command
'address'=>$o->dns_bind, 'address'=>$o->dns_bind,
'port'=>$o->dns_port, 'port'=>$o->dns_port,
'proto'=>SOCK_DGRAM, 'proto'=>SOCK_DGRAM,
'class'=>new DNS(), 'class'=>new DNS,
]); ]);
$children = collect(); $children = collect();

View File

@ -93,13 +93,13 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
switch ($o->name) { switch ($o->name) {
case 'BINKP': case 'BINKP':
$s = new Binkp(Setup::findOrFail(config('app.id'))); $s = new Binkp;
$mo = Mailer::where('name','BINKP')->singleOrFail(); $mo = Mailer::where('name','BINKP')->singleOrFail();
break; break;
case 'EMSI': case 'EMSI':
$s = new EMSI(Setup::findOrFail(config('app.id'))); $s = new EMSI;
$mo = Mailer::where('name','EMSI')->singleOrFail(); $mo = Mailer::where('name','EMSI')->singleOrFail();
break; break;