Skip to content
Snippets Groups Projects
Commit a885773c authored by Francesco Giacomini's avatar Francesco Giacomini
Browse files

avoid c++17 features

parent c773a53b
No related branches found
No related tags found
No related merge requests found
...@@ -427,14 +427,14 @@ static ngx_int_t generic_getter(ngx_http_request_t* r, ...@@ -427,14 +427,14 @@ static ngx_int_t generic_getter(ngx_http_request_t* r,
auto& ac = get_voms_ac(r); auto& ac = get_voms_ac(r);
if (ac.has_value()) { if (!ac) {
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "get_voms_ac() failed"); ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "get_voms_ac() failed");
return NGX_OK; return NGX_OK;
} }
using getter_p = std::string (*)(VomsAc const& voms); using getter_p = std::string (*)(VomsAc const& voms);
auto getter = reinterpret_cast<getter_p>(data); auto getter = reinterpret_cast<getter_p>(data);
std::string const value = getter(ac.value()); std::string const value = getter(*ac);
auto buffer = static_cast<u_char*>(ngx_pnalloc(r->pool, value.size())); auto buffer = static_cast<u_char*>(ngx_pnalloc(r->pool, value.size()));
if (!buffer) { if (!buffer) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment