Fix for messages originating from a point, where PATH: is empty
This commit is contained in:
@@ -686,7 +686,6 @@ class Message extends FTNBase
|
||||
|
||||
// First find our kludge lines
|
||||
$ptr_start = 0;
|
||||
$ptr_end = 0;
|
||||
|
||||
try {
|
||||
while (substr($message,$ptr_start,1) === "\x01") {
|
||||
@@ -828,14 +827,17 @@ class Message extends FTNBase
|
||||
|
||||
$m = [];
|
||||
preg_match('/^([^\s]+:?)+\s+(.*)$/',$line,$m);
|
||||
$o->kludges = [$m[1],$m[2]];
|
||||
|
||||
// Messages that originate from a point dont have anything in a PATH
|
||||
if (count($m) === 2)
|
||||
$o->kludges = [$m[1],$m[2]];
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error(sprintf('%s:! Error parsing message, now at offset [0x%02x] (%s)',
|
||||
self::LOGKEY,
|
||||
$ptr_start,
|
||||
$e->getMessage()),['dump'=>hex_dump($message)]);
|
||||
$e->getMessage()),['dump'=>hex_dump($message),'line'=>$e->getLine(),'file'=>$e->getFile()]);
|
||||
|
||||
throw new InvalidPacketException('Error parsing message');
|
||||
}
|
||||
|
Reference in New Issue
Block a user