| 549 | } |
| 550 | |
| 551 | static ProtocolType FindProtocolOfHandler(const InputMessageHandler& h) { |
| 552 | std::vector<std::pair<ProtocolType, Protocol> > vec; |
| 553 | ListProtocols(&vec); |
| 554 | for (size_t i = 0; i < vec.size(); ++i) { |
| 555 | if (vec[i].second.parse == h.parse && |
| 556 | ((vec[i].second.process_request == h.process) |
| 557 | // ^^ server side |
| 558 | || (vec[i].second.process_response == h.process)) |
| 559 | // ^^ client side |
| 560 | && strcmp(vec[i].second.name, h.name) == 0) { |
| 561 | return vec[i].first; |
| 562 | } |
| 563 | } |
| 564 | return PROTOCOL_UNKNOWN; |
| 565 | } |
| 566 | |
| 567 | void InputMessageBase::Destroy() { |
| 568 | // Release base-specific resources. |
no test coverage detected