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

smp: set tsi in fakewsi used with WAIT_CANCELLED

Together with the new lws_wsi_tsi(wsi) this lets the WAIT_CANCELLED
callback understand its tsi context, the broadcasts are done for each
pt / loop.
This commit is contained in:
Andy Green 2020-10-01 10:39:43 +01:00
parent 636f9c7f01
commit 6490dc3e89

View file

@ -610,8 +610,10 @@ lws_broadcast(struct lws_context_per_thread *pt, int reason, void *in, size_t le
lws_fakewsi_def_plwsa(pt);
int n, ret = 0;
lws_fakewsi_prep_plwsa_ctx(pt->context);
#if !defined(LWS_PLAT_FREERTOS) && LWS_MAX_SMP > 1
((struct lws *)plwsa)->tsi = (int)(pt - &pt->context->pt[0]);
#endif
while (v) {
const struct lws_protocols *p = v->protocols;