Fix CP stats generation for concurrent users. Fixes #3225

This commit is contained in:
jim-p 2013-09-23 09:55:05 -04:00
parent 9e768dafa4
commit 428ea19f8a
2 changed files with 4 additions and 3 deletions

View File

@ -800,7 +800,7 @@ function enable_rrd_graphing() {
/* the Captive Portal stats gathering function. */
$rrdupdatesh .= "\n";
$rrdupdatesh .= "# polling Captive Portal for number of concurrent users\n";
$rrdupdatesh .= "CP=`$php -q $captiveportal_gather '$cpkey' $concurrent`\n";
$rrdupdatesh .= "CP=`${php} -q ${captiveportal_gather} '${cpkey}' 'concurrent'`\n";
$rrdupdatesh .= "$rrdtool update $concurrent_filename \${CP}\n";
$loggedin_filename = $rrddbpath . $ifname . '-' . $cpkey . $captiveportalloggedin;
@ -836,7 +836,7 @@ function enable_rrd_graphing() {
/* the Captive Portal stats gathering function. */
$rrdupdatesh .= "\n";
$rrdupdatesh .= "# polling Captive Portal for number of logged in users\n";
$rrdupdatesh .= "CP=`$php -q $captiveportal_gather $cpkey loggedin`\n";
$rrdupdatesh .= "CP=`${php} -q ${captiveportal_gather} '${cpkey}' 'loggedin'`\n";
$rrdupdatesh .= "$rrdtool update $loggedin_filename \${CP}\n";
}

View File

@ -55,6 +55,7 @@ if(empty($type))
/* echo the rrd required syntax */
echo "N:";
$result = "NaN";
if ($type == "loggedin") {
@ -101,7 +102,7 @@ if ($type == "loggedin") {
else {
$result = $current_user_count;
}
} else
} elseif ($type == "concurrent")
$result = $no_users;
echo "$result";