Fix nodelist crc's that have 8 chars
This commit is contained in:
@@ -378,10 +378,13 @@ class NodelistImport implements ShouldQueue
|
||||
Address::whereIN('id',$remove->pluck('id')->toArray())->update(['active'=>FALSE]);
|
||||
Address::whereIN('id',$remove->pluck('id')->toArray())->delete();
|
||||
|
||||
if (crc16(substr($tocrc,0,-3)) == $file_crc)
|
||||
if ($x=crc16(substr($tocrc,0,-3)) == $file_crc) {
|
||||
Log::info(sprintf('%s:Committing nodelist',self::LOGKEY));
|
||||
DB::commit();
|
||||
else
|
||||
} else {
|
||||
Log::error(sprintf('%s:Rolling back nodelist, CRC doesnt match [%s](%s)',self::LOGKEY,$x,$file_crc));
|
||||
DB::rollBack();
|
||||
}
|
||||
|
||||
fclose($fh);
|
||||
|
||||
|
Reference in New Issue
Block a user