diff --git a/app/Classes/FTN/Packet.php b/app/Classes/FTN/Packet.php index fc9173d..838b27a 100644 --- a/app/Classes/FTN/Packet.php +++ b/app/Classes/FTN/Packet.php @@ -430,7 +430,7 @@ class Packet extends FTNBase implements \Iterator, \Countable Address::unguard(); $ao = Address::firstOrNew([ 'zone_id' => $msg->tzone->id, - 'region_id' => 0, + //'region_id' => 0, 'host_id' => $msg->tn, 'node_id' => $msg->tf, 'point_id' => $msg->tp, @@ -438,6 +438,9 @@ class Packet extends FTNBase implements \Iterator, \Countable ]); Address::reguard(); + if (is_null($ao->region_id)) + $ao->region_id = $ao->host_id; + } catch (\Exception $e) { Log::error(sprintf('%s:! Error finding/creating TO address [%s] for message',self::LOGKEY,$msg->tboss),['error'=>$e->getMessage()]); $this->errors->push($msg); @@ -466,7 +469,7 @@ class Packet extends FTNBase implements \Iterator, \Countable Address::unguard(); $ao = Address::firstOrNew([ 'zone_id' => $msg->fzone->id, - 'region_id' => 0, + //'region_id' => 0, 'host_id' => $msg->fn, 'node_id' => $msg->ff, 'point_id' => $msg->fp, @@ -474,6 +477,9 @@ class Packet extends FTNBase implements \Iterator, \Countable ]); Address::reguard(); + if (is_null($ao->region_id)) + $ao->region_id = $ao->host_id; + } catch (\Exception $e) { Log::error(sprintf('%s:! Error finding/creating FROM address [%s] for message',self::LOGKEY,$msg->fboss),['error'=>$e->getMessage()]); $this->errors->push($msg);