Motion - Bug Report 2006x 07x 10x 111239

BUG: Detection on all threads isnt pause when it is paused on thread 0

When connecting to control via http, thread 0 is called "All Threads", but when pausing detection on thread 0, it is still active on all the child threads.

Paste in your error messages, config settings, terminal window output etc in this text field.

Environment

Motion version: 3.2.6
ffmpeg version: 0.4.8
Shared libraries: ffmpeg, mysql
Server OS: Gentoo 2.6.12-gentoo-r10

-- GunnarSkjold - 10 Jul 2006

Follow up

Modified webhttpd.c to change pause status on all threads when running start/pause on thread 0. Seems to work.

@@ -929,8 +929,16 @@
                pointer = pointer + 5;
                length_uri = length_uri - 5;
                if (length_uri == 0) {
+                       int i = 0;
                        /*call start*/
-                       cnt[thread]->pause = 0;
+                       if(thread == 0) {
+                           do {
+                               cnt[i]->pause = 0;
+                           } while (cnt[++i]);
+                       } else {
+                           cnt[thread]->pause = 0;
+                       }
+
                        if (cnt[0]->conf.control_html_output) {
                                send_template_ini_client(client_socket,ini_template);
                                sprintf(res,"Thread %i Detection resumed<br>\n"
@@ -953,8 +961,16 @@
                pointer = pointer + 5;
                length_uri = length_uri - 5;
                if (length_uri==0) {
+                       int i = 0;
                        /*call pause*/
-                       cnt[thread]->pause=1;
+                       if(thread == 0) {
+                           do {
+                               cnt[i]->pause = 1;
+                           } while (cnt[++i]);
+                       } else {
+                           cnt[thread]->pause = 1;
+                       }
+
                        if (cnt[0]->conf.control_html_output) {
                                send_template_ini_client(client_socket, ini_template);
                                sprintf(res,"Thread %i Detection paused<br>\n"

Fix record

Thanks , it works perfectly. Already committed to SVN , 109 includes your patch.

-- AngelCarpintero - 08 Aug 2006

Fix in 3.2.7

-- KennethLavrsen - 20 Oct 2006

BugReportForm edit

TopicTitle Detection on all threads isnt pause when it is paused on thread 0
BugStatus Released
AssignedBugTo GunnarSkjold
SubmittedBy GunnarSkjold
Topic revision: r4 - 20 Oct 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.