zmu may still output results even if it encounters errors, so continue even if we have an error return status from zmu.

This commit is contained in:
Isaac Connor 2021-08-05 14:48:06 -04:00
parent 7db25a5e1b
commit 222909feb3
1 changed files with 6 additions and 8 deletions

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// //
if ( !canEdit('Monitors') ) { if (!canEdit('Monitors')) {
$view = 'error'; $view = 'error';
return; return;
} }
@ -31,11 +31,9 @@ function probeV4L() {
$command = getZmuCommand(' --query --device'); $command = getZmuCommand(' --query --device');
if ( !empty($_REQUEST['device']) ) if ( !empty($_REQUEST['device']) )
$command .= '='.escapeshellarg($_REQUEST['device']); $command .= '='.escapeshellarg($_REQUEST['device']);
$result = exec(escapeshellcmd($command), $output, $status); $result = exec(escapeshellcmd($command), $output, $status);
if ( $status ) { if ($status) {
ZM\Error("Unable to probe local cameras using $command, status is '$status' " . implode("\n",$output)); ZM\Warning("Errors while probe local cameras using $command, status is '$status' " . implode("\n", $output));
return $cameras;
} }
$monitors = array(); $monitors = array();
@ -325,15 +323,15 @@ xhtmlHeaders(__FILE__, translate('MonitorProbe') );
<div id="page"> <div id="page">
<h2><?php echo translate('MonitorProbe') ?></h2> <h2><?php echo translate('MonitorProbe') ?></h2>
<div id="content"> <div id="content">
<form name="contentForm" id="contentForm" method="post" action="?"> <form name="contentForm" id="contentForm" method="get" action="?">
<input type="hidden" name="view" value="none"/> <input type="hidden" name="view" value="none"/>
<input type="hidden" name="mid" value="<?php echo validNum($_REQUEST['mid']) ?>"/> <input type="hidden" name="mid" value="<?php echo isset($_REQUEST['mid'])?validNum($_REQUEST['mid']):'' ?>"/>
<p> <p>
<?php echo translate('MonitorProbeIntro') ?> <?php echo translate('MonitorProbeIntro') ?>
</p> </p>
<p> <p>
<label for="probe"><?php echo translate('DetectedCameras') ?></label> <label for="probe"><?php echo translate('DetectedCameras') ?></label>
<?php echo htmlSelect('probe', $cameras, null, array('data-on-change-this'=>'configureButtons(this)')); ?> <?php echo htmlSelect('probe', $cameras, null, array('data-on-change-this'=>'configureButtons')); ?>
</p> </p>
<div id="contentButtons"> <div id="contentButtons">
<button type="button" name="saveBtn" value="Save" data-on-click-this="submitCamera" disabled="disabled"> <button type="button" name="saveBtn" value="Save" data-on-click-this="submitCamera" disabled="disabled">