Improvements to echomail path handling, ensuring sender and pktsrc are in the path
This commit is contained in:
@@ -70,7 +70,7 @@ final class Echomail extends Model implements Packet
|
||||
static::created(function($model) {
|
||||
$rogue = collect();
|
||||
$seenby = NULL;
|
||||
$path = [];
|
||||
$path = collect();
|
||||
|
||||
// Parse PATH
|
||||
if ($model->set_path->count())
|
||||
@@ -104,12 +104,17 @@ final class Echomail extends Model implements Packet
|
||||
|
||||
// Our last node in the path is our sender
|
||||
if (isset($model->set_pkt) && isset($model->set_recvtime)) {
|
||||
DB::update('UPDATE echomail_path set recv_pkt=?,recv_at=? where address_id=? and echomail_id=?',[
|
||||
$model->set_pkt,
|
||||
$model->set_recvtime,
|
||||
$path->last(),
|
||||
$model->id,
|
||||
]);
|
||||
if ($path->count()) {
|
||||
DB::update('UPDATE echomail_path set recv_pkt=?,recv_at=? where address_id=? and echomail_id=?',[
|
||||
$model->set_pkt,
|
||||
$model->set_recvtime,
|
||||
$path->last(),
|
||||
$model->id,
|
||||
]);
|
||||
|
||||
} else {
|
||||
Log::critical(sprintf('%s:! Wasnt able to set packet details for [%d] to [%s] to [%s], no path information',self::LOGKEY,$model->id,$model->set_pkt,$model->set_recvtime));
|
||||
}
|
||||
}
|
||||
|
||||
// See if we need to export this message.
|
||||
|
Reference in New Issue
Block a user