Browse Source

add CRC32 subversion fingerprint

main
D4708 4 years ago
parent
commit
f4f9587dbd
  1. 3
      model/ip.php
  2. 1
      peer.php

3
model/ip.php

@ -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

@ -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…
Cancel
Save