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 / assets / linux-ubuntu-2404.svg
Author[]Andy Green <andy@warmcat.com> 2026-04-19 20:15 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-04-19 20:16 UTC
Tree0a5874c2dc15573ea26b7e1ee68c928f06410b0d   Raw Patch
 
CID 503232: REVERSE_INULL
CID 503232: REVERSE_INULL
diff --git a/src/server/s-ws-builder.c b/src/server/s-ws-builder.c index 5e5e225..95bbd54 100644 --- a/src/server/s-ws-builder.c +++ b/src/server/s-ws-builder.c @@ -188,6 +188,9 @@ sais_log_to_db(struct vhd *vhd, sai_log_t *log) sai_log_t *hlog; int step; + if (!log || !log->log) + return; + /* * find the pertask if one exists */ @@ -233,7 +236,7 @@ sais_log_to_db(struct vhd *vhd, sai_log_t *log) lws_sul_schedule(vhd->context, 0, &vhd->sul_logcache, sais_dump_logs_to_db, 250 * LWS_US_PER_MS); - if (log->channel != 3 /* control channel */ || !log->log || + if (log->channel != 3 /* control channel */ || log->len < 5 || memcmp(log->log, " Step ", 5)) return;
Page fetched 0s ago, creation time: 2ms (vhost etag hits: 0%, cache hits: 0%)