0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd::server: Rename opts member pointer to opt.

This commit is contained in:
Jason Volk 2018-03-07 07:21:00 -08:00
parent 90528245de
commit 9b44217ea4
2 changed files with 10 additions and 10 deletions

View file

@ -92,12 +92,12 @@ struct ircd::server::request
server::in in; server::in in;
/// Options /// Options
const struct opts *opts { &opts_default }; const opts *opt { &opts_default };
request(const net::hostport &, request(const net::hostport &,
server::out, server::out,
server::in, server::in,
const struct opts *const & = nullptr); const opts *const & = nullptr);
request() = default; request() = default;
request(request &&) noexcept; request(request &&) noexcept;
@ -126,11 +126,11 @@ inline
ircd::server::request::request(const net::hostport &hostport, ircd::server::request::request(const net::hostport &hostport,
server::out out, server::out out,
server::in in, server::in in,
const struct opts *const &opts) const opts *const &opt)
:tag{nullptr} :tag{nullptr}
,out{std::move(out)} ,out{std::move(out)}
,in{std::move(in)} ,in{std::move(in)}
,opts{opts?: &opts_default} ,opt{opt?: &opts_default}
{ {
submit(hostport, *this); submit(hostport, *this);
} }
@ -142,7 +142,7 @@ noexcept
,tag{std::move(o.tag)} ,tag{std::move(o.tag)}
,out{std::move(o.out)} ,out{std::move(o.out)}
,in{std::move(o.in)} ,in{std::move(o.in)}
,opts{std::move(o.opts)} ,opt{std::move(o.opt)}
{ {
if(tag) if(tag)
associate(*this, *tag, std::move(o)); associate(*this, *tag, std::move(o));
@ -160,7 +160,7 @@ noexcept
out = std::move(o.out); out = std::move(o.out);
in = std::move(o.in); in = std::move(o.in);
tag = std::move(o.tag); tag = std::move(o.tag);
opts = std::move(o.opts); opt = std::move(o.opt);
if(tag) if(tag)
associate(*this, *tag, std::move(o)); associate(*this, *tag, std::move(o));

View file

@ -2116,10 +2116,10 @@ ircd::server::tag::read_head(const const_buffer &buffer,
if(dynamic) if(dynamic)
{ {
assert(req.opts); assert(req.opt);
const size_t alloc_size const size_t alloc_size
{ {
std::min(head.content_length, req.opts->content_length_maxalloc) std::min(head.content_length, req.opt->content_length_maxalloc)
}; };
req.in.dynamic = unique_buffer<mutable_buffer>{alloc_size}; req.in.dynamic = unique_buffer<mutable_buffer>{alloc_size};
@ -2274,8 +2274,8 @@ ircd::server::tag::set_value(args&&... a)
std::forward<args>(a)... std::forward<args>(a)...
}; };
assert(request->opts); assert(request->opt);
if(request->opts->http_exceptions && code >= http::code(300)) if(request->opt->http_exceptions && code >= http::code(300))
{ {
const string_view content const string_view content
{ {