add CRC32 subversion fingerprint

This commit is contained in:
D4708 2021-05-30 04:35:54 +03:00
parent 777016df66
commit f4f9587dbd
2 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,7 @@ class ModelIp extends Model {
$inbound,
$version,
$subVersion,
$subVersionCRC32,
$syncNode) {
try {
@ -108,6 +109,7 @@ class ModelIp extends Model {
`inbound` = ?,
`version` = ?,
`subVersion` = ?,
`subVersionCRC32` = ?,
`syncNode` = ?,
`timeAdded` = UNIX_TIMESTAMP()');
@ -123,6 +125,7 @@ class ModelIp extends Model {
$inbound,
$version,
$subVersion,
$subVersionCRC32,
$syncNode]);
return $this->db->lastInsertId();

View File

@ -93,6 +93,7 @@ if ($peers = $curlPeer->getAll()) {
(int) $peer['inbound'],
(int) $peer['version'],
preg_replace('/[^\d]/', '', $peer['subver']),
crc32($peer['subver']),
(isset($peer['syncnode']) ? (int) $peer['syncnode'] : 0));
} else {
$modelLog->add(_('Could not extract peer address or port'));