1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

cgi: modernize sul usage

This commit is contained in:
Andy Green 2020-12-29 12:01:40 +00:00
parent c9731c5f17
commit 5af65114c9

View file

@ -113,8 +113,8 @@ lws_cgi_sul_cb(lws_sorted_usec_list_t *sul)
lws_cgi_kill_terminated(pt);
__lws_sul_insert_us(&pt->pt_sul_owner[LWSSULLI_MISS_IF_SUSPENDED],
&pt->sul_cgi, 3 * LWS_US_PER_SEC);
lws_sul_schedule(pt->context, (int)(pt - pt->context->pt), &pt->sul_cgi,
lws_cgi_sul_cb, 3 * LWS_US_PER_SEC);
}
static int
@ -123,13 +123,10 @@ rops_pt_init_destroy_cgi(struct lws_context *context,
struct lws_context_per_thread *pt, int destroy)
{
if (!destroy) {
pt->sul_cgi.cb = lws_cgi_sul_cb;
__lws_sul_insert_us(&pt->pt_sul_owner[LWSSULLI_MISS_IF_SUSPENDED],
&pt->sul_cgi, 3 * LWS_US_PER_SEC);
lws_sul_schedule(context, (int)(pt - context->pt), &pt->sul_cgi,
lws_cgi_sul_cb, 3 * LWS_US_PER_SEC);
} else
lws_dll2_remove(&pt->sul_cgi.list);
lws_sul_cancel(&pt->sul_cgi);
return 0;
}