Mercurial > hg > orthanc-stone
diff Framework/Messages/IObserver.cpp @ 1276:db759fb1d6e6 bugs/2020-02-invisible-slice
Added debug message if observer invalid
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 04 Feb 2020 12:31:22 +0100 |
parents | 2d8ab34c8c91 |
children |
line wrap: on
line diff
--- a/Framework/Messages/IObserver.cpp Tue Feb 04 12:31:03 2020 +0100 +++ b/Framework/Messages/IObserver.cpp Tue Feb 04 12:31:22 2020 +0100 @@ -82,8 +82,13 @@ bool IObserver::DoesFingerprintLookGood() const { - return (fingerprint_[0] >= IObserver_FIRST_UNIQUE_ID) && + bool ok = (fingerprint_[0] >= IObserver_FIRST_UNIQUE_ID) && (fingerprint_[1] == fingerprint_[0] / 2) && (fingerprint_[2] == fingerprint_[1] + IObserver_UNIQUE_ID_MAGIC_NUMBER); + if(!ok) + { + LOG(INFO) << "Fingerprint not valid: " << " fingerprint_[0] = " << fingerprint_[0] << " fingerprint_[1] = " << fingerprint_[1]<< " fingerprint_[2] = " << fingerprint_[2]; + } + return ok; } }