| 123 | } |
| 124 | |
| 125 | bool CommandTransaction::isResponseCompleteResult(CommandTransaction::Result& result, uint32_t sequence) |
| 126 | { |
| 127 | if(result.size() == ResponseCompleteLength) |
| 128 | { |
| 129 | uint32_t *data = reinterpret_cast<uint32_t *>(&result[0]); |
| 130 | |
| 131 | if(data[0] == ResponseCompleteMagic) |
| 132 | { |
| 133 | if(data[1] != sequence) |
| 134 | { |
| 135 | LOG_ERROR << "response complete with wrong sequence number! expected: " << sequence << " got: " << data[1]; |
| 136 | } |
| 137 | return true; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | return false; |
| 142 | } |
| 143 | |
| 144 | |
| 145 | } /* namespace protocol */ |