Commit 05027d74 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Remove call to SES_Reserve_proto_priv in h2_init_sess

h2_init_sess can only be reached through H1 with either previous knowledge
or opportunistic upgrade. Because of this the proto_priv session attribute
will always be set before entry. This patch simplifies and removes dead
code containing a call to SES_Reserve_proto_priv.

Note: Better diff with the --ignore-all-space option
parent 613fa433
......@@ -101,12 +101,11 @@ h2_init_sess(const struct worker *wrk, struct sess *sp,
uintptr_t *up;
struct h2_sess *h2;
if (SES_Get_proto_priv(sp, &up)) {
/* Already reserved if we came via H1 */
XXXAN(SES_Reserve_proto_priv(sp, &up));
*up = 0;
}
if (*up == 0) {
/* proto_priv session attribute will always have been set up by H1
* before reaching here. */
AZ(SES_Get_proto_priv(sp, &up));
assert(*up == 0);
if (srq == NULL)
srq = Req_New(wrk, sp);
AN(srq);
......@@ -129,13 +128,10 @@ h2_init_sess(const struct worker *wrk, struct sess *sp,
h2->remote_settings = H2_proto_settings;
h2->decode = decode;
AZ(VHT_Init(h2->dectbl,
h2->local_settings.header_table_size));
AZ(VHT_Init(h2->dectbl, h2->local_settings.header_table_size));
*up = (uintptr_t)h2;
}
AN(up);
CAST_OBJ_NOTNULL(h2, (void*)(*up), H2_SESS_MAGIC);
return (h2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment