mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Fail engine ctor if stream callbackes are not specified
This commit is contained in:
parent
83506617f9
commit
df25d34a5e
2 changed files with 7 additions and 0 deletions
|
@ -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)))
|
||||
|
|
|
@ -20,6 +20,7 @@ main (void)
|
|||
memset(&api, 0, sizeof(api));
|
||||
api.ea_settings = &settings;
|
||||
api.ea_packets_out = (void *) (uintptr_t) 1;
|
||||
api.ea_stream_if = (void *) (uintptr_t) 2;
|
||||
|
||||
engine = lsquic_engine_new(flags, &api);
|
||||
assert(engine);
|
||||
|
|
Loading…
Reference in a new issue