comparison Framework/Messages/IObserver.cpp @ 1293:f050391249f0

Merged changes from bugfix branch
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 21 Feb 2020 15:27:42 +0100
parents db759fb1d6e6
children
comparison
equal deleted inserted replaced
1285:4f8fc8dbd2a1 1293:f050391249f0
80 IObserver_nextUniqueId++; 80 IObserver_nextUniqueId++;
81 } 81 }
82 82
83 bool IObserver::DoesFingerprintLookGood() const 83 bool IObserver::DoesFingerprintLookGood() const
84 { 84 {
85 return (fingerprint_[0] >= IObserver_FIRST_UNIQUE_ID) && 85 bool ok = (fingerprint_[0] >= IObserver_FIRST_UNIQUE_ID) &&
86 (fingerprint_[1] == fingerprint_[0] / 2) && 86 (fingerprint_[1] == fingerprint_[0] / 2) &&
87 (fingerprint_[2] == fingerprint_[1] + IObserver_UNIQUE_ID_MAGIC_NUMBER); 87 (fingerprint_[2] == fingerprint_[1] + IObserver_UNIQUE_ID_MAGIC_NUMBER);
88 if(!ok)
89 {
90 LOG(INFO) << "Fingerprint not valid: " << " fingerprint_[0] = " << fingerprint_[0] << " fingerprint_[1] = " << fingerprint_[1]<< " fingerprint_[2] = " << fingerprint_[2];
91 }
92 return ok;
88 } 93 }
89 } 94 }