While using v1.32.3 I ran into an issue where zmcontrol.pl would occasionally get stuck in a loop that consumed memory until it brought up the OOM killer, or froze the server. I noticed it while using the PTZ controls (with the wrong PTZ control defined) - or using the PTZ controls (with the correct control type defined) and then restarting the server. Additionally, passing the wrong control type to the script would have the same effect. I am not sure if it applies to all the Control scripts or not.
Resolving it just entailed adding in a check to see if the control object had the function being called before passing it off:
Code: Select all
$control->$command($params);
Code: Select all
if($control->can("$command")) {
$control->$command($params);
}
else {
Error("Invalid command attempted for server $id/$protocol");
}
Also, thanks for all the hard work on a wonderful piece of software!
JB