Fix for echomail notifications, when echomails come from a point. Auto detect address when manually processing packets.
This commit is contained in:
@@ -37,12 +37,20 @@ class PacketInfo extends Command
|
||||
{
|
||||
$fs = Storage::disk(config('fido.local_disk'));
|
||||
$rel_name = sprintf('%s/%s',config('fido.dir'),$this->argument('file'));
|
||||
$a = NULL;
|
||||
|
||||
$f = new File($fs->path($rel_name));
|
||||
$a = $this->argument('ftn') ? Address::findFTN($this->argument('ftn')) : NULL;
|
||||
|
||||
$m = NULL;
|
||||
if ($this->argument('ftn')) {
|
||||
$a = Address::findFTN($this->argument('ftn'));
|
||||
|
||||
} elseif (preg_match('/^(([0-9]+)-)+/',$this->argument('file'),$m)) {
|
||||
$a = Address::findOrFail(hexdec($m[2]));
|
||||
}
|
||||
|
||||
foreach ($f as $packet) {
|
||||
$pkt = Packet::process($packet,$x=$f->itemName(),$f->itemSize(),$a->zone->domain);
|
||||
$pkt = Packet::process($packet,$x=$f->itemName(),$f->itemSize(),$a?->zone->domain);
|
||||
|
||||
$this->alert(sprintf('File Name: %s',$x));
|
||||
|
||||
|
Reference in New Issue
Block a user