mirror of
https://github.com/twisterarmy/twister-analytics-crawler.git
synced 2025-01-30 16:34:18 +00:00
add CRC32 subversion fingerprint
This commit is contained in:
parent
777016df66
commit
f4f9587dbd
@ -93,6 +93,7 @@ class ModelIp extends Model {
|
|||||||
$inbound,
|
$inbound,
|
||||||
$version,
|
$version,
|
||||||
$subVersion,
|
$subVersion,
|
||||||
|
$subVersionCRC32,
|
||||||
$syncNode) {
|
$syncNode) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -108,6 +109,7 @@ class ModelIp extends Model {
|
|||||||
`inbound` = ?,
|
`inbound` = ?,
|
||||||
`version` = ?,
|
`version` = ?,
|
||||||
`subVersion` = ?,
|
`subVersion` = ?,
|
||||||
|
`subVersionCRC32` = ?,
|
||||||
`syncNode` = ?,
|
`syncNode` = ?,
|
||||||
|
|
||||||
`timeAdded` = UNIX_TIMESTAMP()');
|
`timeAdded` = UNIX_TIMESTAMP()');
|
||||||
@ -123,6 +125,7 @@ class ModelIp extends Model {
|
|||||||
$inbound,
|
$inbound,
|
||||||
$version,
|
$version,
|
||||||
$subVersion,
|
$subVersion,
|
||||||
|
$subVersionCRC32,
|
||||||
$syncNode]);
|
$syncNode]);
|
||||||
|
|
||||||
return $this->db->lastInsertId();
|
return $this->db->lastInsertId();
|
||||||
|
1
peer.php
1
peer.php
@ -93,6 +93,7 @@ if ($peers = $curlPeer->getAll()) {
|
|||||||
(int) $peer['inbound'],
|
(int) $peer['inbound'],
|
||||||
(int) $peer['version'],
|
(int) $peer['version'],
|
||||||
preg_replace('/[^\d]/', '', $peer['subver']),
|
preg_replace('/[^\d]/', '', $peer['subver']),
|
||||||
|
crc32($peer['subver']),
|
||||||
(isset($peer['syncnode']) ? (int) $peer['syncnode'] : 0));
|
(isset($peer['syncnode']) ? (int) $peer['syncnode'] : 0));
|
||||||
} else {
|
} else {
|
||||||
$modelLog->add(_('Could not extract peer address or port'));
|
$modelLog->add(_('Could not extract peer address or port'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user