refactor: core code in lib/core and private-libwebsockets.h to core/private.h
This commit is coverity-clean as tested
cmake .. -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITHOUT_EXTENSIONS=1 -DLWS_WITH_ACME=1 -DLWS_WITH_LWSWS=1 -DLWS_WITH_LIBUV=1 -DLWS_WITH_HTTP2=1 -DLWS_WITHOUT_CLIENT=0 -DLWS_WITHOUT_SERVER=0 -DLWS_UNIX_SOCK=1 -DLWS_WITH_TLS=0 -DLWS_WITH_MBEDTLS=0 -DLWS_WITH_CGI=1 -DCMAKE_BUILD_TYPE=DEBUG -DLWS_WITH_GENERIC_SESSIONS=1 -DLWS_WITH_RANGES=1 -DLWS_ROLE_WS=1 -DLWS_MAX_SMP=16 -DLWS_ROLE_H1=1 -DLWS_WITH_WOLFSSL=0 -DLWS_WITH_LIBEV=0 -DLWS_WITH_LIBEVENT=1
diff --git a/minimal-examples/http-server/minimal-http-server-sse-ring/minimal-http-server-sse-ring.c b/minimal-examples/http-server/minimal-http-server-sse-ring/minimal-http-server-sse-ring.c
index 8027982..616300c 100644
--- a/minimal-examples/http-server/minimal-http-server-sse-ring/minimal-http-server-sse-ring.c
+++ b/minimal-examples/http-server/minimal-http-server-sse-ring/minimal-http-server-sse-ring.c
@@ -120,7 +120,8 @@
pthread_mutex_unlock(&vhd->lock_ring); /* } ring lock ------- */
wait:
- usleep(100000 + (rand() & 0xfffff));
+ /* rand() would make more sense but coverity shrieks */
+ usleep(100000 + (time(NULL) & 0xffff));
} while (!vhd->finished);