| 8691 | } |
| 8692 | |
| 8693 | TSReturnCode |
| 8694 | TSHttpSsnClientProtocolStackGet(TSHttpSsn ssnp, int count, const char **result, int *actual) |
| 8695 | { |
| 8696 | sdk_assert(sdk_sanity_check_http_ssn(ssnp) == TS_SUCCESS); |
| 8697 | sdk_assert(count == 0 || result != nullptr); |
| 8698 | auto const *cs = reinterpret_cast<ProxySession *>(ssnp); |
| 8699 | int new_count = 0; |
| 8700 | if (cs && count > 0) { |
| 8701 | auto mem = static_cast<std::string_view *>(alloca(sizeof(std::string_view) * count)); |
| 8702 | new_count = cs->populate_protocol(mem, count); |
| 8703 | for (int i = 0; i < new_count; ++i) { |
| 8704 | result[i] = mem[i].data(); |
| 8705 | } |
| 8706 | } |
| 8707 | if (actual) { |
| 8708 | *actual = new_count; |
| 8709 | } |
| 8710 | return TS_SUCCESS; |
| 8711 | } |
| 8712 | |
| 8713 | // Return information about the protocols used by the server |
| 8714 | TSReturnCode |
no test coverage detected