Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / src / web / w-comms.c
Author[]Andy Green <andy@warmcat.com> 2026-04-19 19:52 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-04-19 19:52 UTC
Tree8a20d0831dc1e8befa3742f35d231917ee6d6cc1   Raw Patch
 
CID 503246: REVERSE_INULL
CID 503246: REVERSE_INULL
diff --git a/src/web/w-ws-browser.c b/src/web/w-ws-browser.c index fb45c88..30c9a36 100644 --- a/src/web/w-ws-browser.c +++ b/src/web/w-ws-browser.c @@ -402,26 +402,23 @@ saiw_pss_schedule_taskinfo(struct pss *pss, const char *task_uuid, int logsub) * no db or no artifacts can also be a normal situation... */ - if (one_task) { + sai_task_uuid_to_event_uuid(event_uuid, one_task->uuid); - sai_task_uuid_to_event_uuid(event_uuid, one_task->uuid); + lws_dll2_owner_clear(&owner); + if (!sai_event_db_ensure_open(pss->vhd->context, &pss->vhd->sqlite3_cache, + pss->vhd->sqlite3_path_lhs, event_uuid, + 0, &pdb)) { - lws_dll2_owner_clear(&owner); - if (!sai_event_db_ensure_open(pss->vhd->context, &pss->vhd->sqlite3_cache, - pss->vhd->sqlite3_path_lhs, event_uuid, - 0, &pdb)) { + lws_snprintf(filt, sizeof(filt), " and (task_uuid == '%s')", + one_task->uuid); - lws_snprintf(filt, sizeof(filt), " and (task_uuid == '%s')", - one_task->uuid); + if (lws_struct_sq3_deserialize(pdb, filt, NULL, + lsm_schema_sq3_map_artifact, + &owner, + &query_ac, 0, 10)) + lwsl_err("%s: get afcts failed\n", __func__); - if (lws_struct_sq3_deserialize(pdb, filt, NULL, - lsm_schema_sq3_map_artifact, - &owner, - &query_ac, 0, 10)) - lwsl_err("%s: get afcts failed\n", __func__); - - sai_event_db_close(&pss->vhd->sqlite3_cache, &pdb); - } + sai_event_db_close(&pss->vhd->sqlite3_cache, &pdb); } if (n == LSJS_RESULT_ERROR) { @@ -435,7 +432,7 @@ saiw_pss_schedule_taskinfo(struct pss *pss, const char *task_uuid, int logsub) lws_write_ws_flags(LWS_WRITE_TEXT, fi, 1)); /* does he want to subscribe to logs? */ - if (logsub && one_task && !pss->subs_list.owner) { + if (logsub && !pss->subs_list.owner) { strcpy(pss->sub_task_uuid, one_task->uuid); lws_dll2_add_head(&pss->subs_list, &pss->vhd->subs_owner); pss->sub_timestamp = pss->initial_log_timestamp; /* where we got up to */
Page fetched 0s ago, creation time: 3ms (vhost etag hits: 0%, cache hits: 0%)