Fail engine ctor if stream callbackes are not specified

This commit is contained in:
Dmitri Tikhonov 2020-02-20 17:01:15 -05:00
parent 83506617f9
commit df25d34a5e
2 changed files with 7 additions and 0 deletions

View file

@ -470,6 +470,12 @@ lsquic_engine_new (unsigned flags,
return NULL;
}
if (!api->ea_stream_if)
{
LSQ_ERROR("stream interface is not specified");
return NULL;
}
if (api->ea_settings &&
0 != lsquic_engine_check_settings(api->ea_settings, flags,
err_buf, sizeof(err_buf)))