Fix seenby/path addresses, fix when eom signature is split over the readbuf
This commit is contained in:
@@ -208,7 +208,22 @@ class Message extends FTNBase
|
||||
{
|
||||
$o = new self($domain);
|
||||
|
||||
$o->header = unpack(self::unpackheader(self::header),substr($msg,0,self::HEADER_LEN));
|
||||
try {
|
||||
$o->header = unpack(self::unpackheader(self::header),substr($msg,0,self::HEADER_LEN));
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error(sprintf('%s:! Error bad packet header',self::LOGKEY));
|
||||
$validator = Validator::make([
|
||||
'header' => substr($msg,0,self::HEADER_LEN),
|
||||
],[
|
||||
'header' => [function ($attribute,$value,$fail) use ($e) { return $fail($e->getMessage()); }]
|
||||
]);
|
||||
|
||||
if ($validator->fails())
|
||||
$o->errors = $validator;
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
$ptr = 0;
|
||||
// To User
|
||||
@@ -577,7 +592,7 @@ class Message extends FTNBase
|
||||
if ($aos->has($ftn))
|
||||
$ao = $aos->get($ftn);
|
||||
else
|
||||
$aos->put($ftn,$ao=(bool)Address::findFTN($ftn));
|
||||
$aos->put($ftn,($ao=(Address::findFTN($ftn))?->id));
|
||||
|
||||
if (! $ao) {
|
||||
Log::alert(sprintf('%s:! Undefined Node [%s] in %s.',self::LOGKEY,$ftn,$type));
|
||||
|
Reference in New Issue
Block a user