From a3c8b17665a6706e8ce9bd25394e167f8775a52d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 28 Aug 2019 16:55:40 +0200 Subject: [PATCH 1/3] web: reduce polling timeout for lws_service --- lib/web.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web.cpp b/lib/web.cpp index de2db734f..8b60c1484 100644 --- a/lib/web.cpp +++ b/lib/web.cpp @@ -170,7 +170,7 @@ void Web::worker() logger->info("Started worker"); while (running) { - lws_service(context, 100); + lws_service(context, 10); while (!writables.empty()) { wsi = writables.pop(); From bbe01d0bd2d4413c2de103af3ea98fcaa7e0cc5e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 28 Aug 2019 16:56:22 +0200 Subject: [PATCH 2/3] stats: fix state assertions in stats hook --- lib/hooks/stats.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/hooks/stats.cpp b/lib/hooks/stats.cpp index b6bf63240..94696e402 100644 --- a/lib/hooks/stats.cpp +++ b/lib/hooks/stats.cpp @@ -232,12 +232,16 @@ public: virtual void prepare() { + assert(state == State::CHECKED); + stats = std::make_shared(buckets, warmup); /* Register statistic object to path. * * This allows the path code to update statistics. */ node->stats = stats; + + state = State::PREPARED; } }; From 287f2497359e4068342e07cf526eb90ef8e1271b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 29 Aug 2019 09:59:04 +0200 Subject: [PATCH 3/3] msg: fix intiialization of reserved fields --- lib/formats/msg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/formats/msg.cpp b/lib/formats/msg.cpp index 44acd2dad..b871cbc4e 100644 --- a/lib/formats/msg.cpp +++ b/lib/formats/msg.cpp @@ -110,6 +110,8 @@ int msg_from_sample(struct msg *msg_in, struct sample *smp, struct vlist *signal { msg_in->type = MSG_TYPE_DATA; msg_in->version = MSG_VERSION; + msg_in->rsvd1 = 0; + msg_in->resv2 = 0; msg_in->length = (uint16_t) smp->length; msg_in->sequence = (uint32_t) smp->sequence; msg_in->ts.sec = smp->ts.origin.tv_sec;