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