Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
1275:41d19fa749b7 | 1276:db759fb1d6e6 |
---|---|
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 } |