| 24 | } |
| 25 | |
| 26 | bool CMessageHeader::IsMessageTypeValid() const |
| 27 | { |
| 28 | // Check the message type string for errors |
| 29 | for (const char* p1 = m_msg_type; p1 < m_msg_type + MESSAGE_TYPE_SIZE; ++p1) { |
| 30 | if (*p1 == 0) { |
| 31 | // Must be all zeros after the first zero |
| 32 | for (; p1 < m_msg_type + MESSAGE_TYPE_SIZE; ++p1) { |
| 33 | if (*p1 != 0) { |
| 34 | return false; |
| 35 | } |
| 36 | } |
| 37 | } else if (*p1 < ' ' || *p1 > 0x7E) { |
| 38 | return false; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | CInv::CInv() |
| 46 | { |
no outgoing calls
no test coverage detected