Merge branch 'master' of github.com:ZoneMinder/zoneminder

This commit is contained in:
Isaac Connor 2021-08-29 09:17:36 -04:00
commit 048b8b13a3
6 changed files with 23 additions and 17 deletions

View File

@ -2,7 +2,7 @@ Source: zoneminder
Section: net
Priority: optional
Maintainer: Isaac Connor <isaac@zoneminder.com>
Build-Depends: debhelper (>= 11), sphinx-doc, python3-sphinx, dh-linktree, dh-apache2
Build-Depends: debhelper (>= 10), sphinx-doc, python3-sphinx, dh-linktree, dh-apache2
,cmake
,libavcodec-dev
,libavformat-dev

View File

@ -5,10 +5,7 @@ This screen lets you customize several aspects of the web interface of ZoneMinde
.. image:: images/Options_web.png
WEB_TITLE -
.. todo ::
not quite sure what this does. Seems to change the "target" name - not sure what effect it is supposed to have.
WEB_TITLE - The actual text that is shown on the login screen. It is possible that it also appears in other areas.
WEB_TITLE_PREFIX - If you have more than one installation of ZoneMinder it can be helpful to display different titles for each one. Changing this option allows you to customise the window titles to include further information to aid identification.

View File

@ -100,7 +100,8 @@ void RemoteCamera::Initialise() {
int ret = getaddrinfo(host.c_str(), port.c_str(), &hints, &hp);
if ( ret != 0 ) {
Fatal( "Can't getaddrinfo(%s port %s): %s", host.c_str(), port.c_str(), gai_strerror(ret) );
Error( "Can't getaddrinfo(%s port %s): %s", host.c_str(), port.c_str(), gai_strerror(ret) );
return;
}
struct addrinfo *p = nullptr;
int addr_count = 0;

View File

@ -144,6 +144,14 @@ void RemoteCameraHttp::Initialise() {
int RemoteCameraHttp::Connect() {
struct addrinfo *p = nullptr;
if (!hp) {
RemoteCamera::Initialise();
if (!hp) {
Error("Unable to resolve address for remote camera, aborting");
return -1;
}
}
for ( p = hp; p != nullptr; p = p->ai_next ) {
sd = socket( p->ai_family, p->ai_socktype, p->ai_protocol );
if ( sd < 0 ) {

View File

@ -266,7 +266,7 @@ class MonitorsController extends AppController {
if ($mToken) {
$auth = ' -T '.$mToken;
} else if (ZM_AUTH_RELAY == 'hashed') {
$auth = ' -A '.calculateAuthHash(ZM_AUTH_HASH_IPS?$_SERVER['REMOTE_ADDR']:'');
$auth = ' -A '.calculateAuthHash(''); # Can't do REMOTE_IP because zmu doesn't normally have access to it.
} else if (ZM_AUTH_RELAY == 'plain') {
# Plain requires the plain text password which must either be in request or stored in session
$password = $this->request->query('pass') ? $this->request->query('pass') : $this->request->data('pass');;

View File

@ -73,10 +73,10 @@ function processRows(rows) {
function showEvents() {
$j('#ptzControls').addClass('hidden');
$j('#events').removeClass('hidden');
if ( $j('#eventsControl') ) {
if ($j('#eventsControl')) {
$j('#eventsControl').addClass('hidden');
}
if ( $j('#controlControl') ) {
if ($j('#controlControl')) {
$j('#controlControl').removeClass('hidden');
}
showMode = 'events';
@ -85,10 +85,10 @@ function showEvents() {
function showPtzControls() {
$j('#events').addClass('hidden');
$j('#ptzControls').removeClass('hidden');
if ( $j('#eventsControl') ) {
if ($j('#eventsControl')) {
$j('#eventsControl').removeClass('hidden');
}
if ( $j('#controlControl') ) {
if ($j('#controlControl')) {
$j('#controlControl').addClass('hidden');
}
showMode = 'control';
@ -132,13 +132,13 @@ function setAlarmState(currentAlarmState) {
alarmState = currentAlarmState;
var stateClass = '';
if ( alarmState == STATE_ALARM ) {
if (alarmState == STATE_ALARM) {
stateClass = 'alarm';
} else if ( alarmState == STATE_ALERT ) {
} else if (alarmState == STATE_ALERT) {
stateClass = 'alert';
}
$j('#stateValue').text(stateStrings[alarmState]);
if ( stateClass ) {
if (stateClass) {
$j('#stateValue').addClass(stateClass);
} else {
$j('#stateValue').removeClass();
@ -855,10 +855,10 @@ function initPage() {
if (monitorType != 'WebSite') {
if (streamMode == 'single') {
statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout );
statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
setInterval(watchdogCheck, statusRefreshTimeout*2, 'status');
} else {
streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout );
streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream');
}