From 56eda6b63ca18adfdb36e64b0f3412e8b6685db8 Mon Sep 17 00:00:00 2001 From: Mr-DaveDev Date: Tue, 13 Aug 2019 20:18:23 -0600 Subject: [PATCH] Answer incorrect web stream requests (#982) Closes #916 --- webu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webu.c b/webu.c index 3e0cae2b..72d52779 100644 --- a/webu.c +++ b/webu.c @@ -1297,9 +1297,6 @@ static int webu_answer_strm(void *cls return MHD_YES; } - /* Do not answer a request until the motion loop has completed at least once */ - if (webui->cnt->passflag == 0) return MHD_NO; - if (strcmp (method, "GET") != 0){ MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO ,_("Invalid Method requested: %s"),method); return MHD_NO; @@ -1316,6 +1313,9 @@ static int webu_answer_strm(void *cls return retcd; } + /* Do not answer a request until the motion loop has completed at least once */ + if (webui->cnt->passflag == 0) return MHD_NO; + if (webui->cnt->webcontrol_finish) return MHD_NO; if (strlen(webui->clientip) == 0){