| 8843 | } |
| 8844 | |
| 8845 | TSReturnCode |
| 8846 | TSHostStatusGet(const char *hostname, const size_t hostname_len, TSHostStatus *status, unsigned int *reason) |
| 8847 | { |
| 8848 | HostStatRec *hst = HostStatus::instance().getHostStatus(std::string_view(hostname, hostname_len)); |
| 8849 | if (hst == nullptr) { |
| 8850 | return TS_ERROR; |
| 8851 | } |
| 8852 | if (status != nullptr) { |
| 8853 | *status = hst->status; |
| 8854 | } |
| 8855 | if (reason != nullptr) { |
| 8856 | *reason = hst->reasons; |
| 8857 | } |
| 8858 | return TS_SUCCESS; |
| 8859 | } |
| 8860 | |
| 8861 | void |
| 8862 | TSHostStatusSet(const char *hostname, const size_t hostname_len, TSHostStatus status, const unsigned int down_time, |
nothing calls this directly
no test coverage detected