Possible BUG in zmfix.cpp

Forum for questions and support relating to the 1.24.x releases only.
Locked
Jethro_uk
Posts: 14
Joined: Tue Sep 18, 2012 3:19 pm

Possible BUG in zmfix.cpp

Post by Jethro_uk »

Having spent a frustrating day trying to control my wireless IP camera (see hardware forum) I believe I have encountered a bug in zmfix.cpp - it could be faulty understanding on my part, if so I apologise.

The issue surrounds an error that was appearing in my logs:

Code: Select all

09/18/12 19:35:27.771420 zmfix[28013].ERR-zmfix.cpp/40 [Can't stat XXXXXXX: No such file or directory]
where XXXXXXX is the value of "ControlDevice" in table "monitors". Trawling through zmfix.cpp, it appears there are 2 SQL SELECTs which are executed, leading to zmfix trying to issue a stat(device) command. The first SQL, is:

Code: Select all

"select distinct Device from Monitors where not isnull(Device) and Type = 'Local'"
This makes sense - return a list of local devices to attempt to lock. The next statement is :

Code: Select all

"select distinct ControlDevice from Monitors where not isnull(ControlDevice)"
now on my installation, this returns "" from the record for my monitor. Which implies that the field "ControlDevice" can't store NULLs. Just in case I had messed things up inadvertantly, I deleted the monitor, and recreated it, leaving the "control" tab blank. Unfortunately when I ran the SQL above, it still returned a row, and therefore zmfix.cpp failed, presumably leading to other things failing.

Apologies if the syntax looks skewy ... I was bought up on the M$ side of the tracks.

e2a: I am running ZM v 1.24.2 on Ubuntu 10.04 (with a v3 kernel).
Jethro_uk
Posts: 14
Joined: Tue Sep 18, 2012 3:19 pm

Re: Possible BUG in zmfix.cpp

Post by Jethro_uk »

OK, I managed to get a NULL into the database, and now there are no errors from zmfix.cpp.

Which means I am now back to http://www.zoneminder.com/forums/viewto ... 14&t=19671
Locked