diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-03-21 16:29:07 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-03-21 16:29:07 +0000 |
commit | 637345f3d9fb5c880f681d26d53165171d683938 (patch) | |
tree | a96e437b8df1b7d1c63c17ecf4ce1821a4a196b1 /usr/local/captiveportal | |
parent | 5918fbaf3192409289f7f4cba030ff9c817ddc62 (diff) | |
download | pfsense-637345f3d9fb5c880f681d26d53165171d683938.zip pfsense-637345f3d9fb5c880f681d26d53165171d683938.tar.gz |
Silence eclipse errors
Diffstat (limited to 'usr/local/captiveportal')
-rw-r--r-- | usr/local/captiveportal/radius_accounting.inc | 9 | ||||
-rw-r--r-- | usr/local/captiveportal/radius_authentication.inc | 19 |
2 files changed, 8 insertions, 20 deletions
diff --git a/usr/local/captiveportal/radius_accounting.inc b/usr/local/captiveportal/radius_accounting.inc index 50dfa20..64ae05d 100644 --- a/usr/local/captiveportal/radius_accounting.inc +++ b/usr/local/captiveportal/radius_accounting.inc @@ -249,16 +249,13 @@ function RADIUS_ACCOUNTING_STOP($ruleno,$username,$sessionid,$start_time,$radius if (PEAR::isError($result)) { $retvalue['acct_val'] = 1; $retvalue['error'] = $result->getMessage(); - if ($debug) - printf("Radius send failed: %s<br>\n", $retvalue['error']); + } else if ($result === true) { $retvalue['acct_val'] = 5 ; - if ($debug) - printf("Radius Accounting succeeded<br>\n"); + } else { $retvalue['acct_val'] = 1 ; - if ($debug) - printf("Radius Accounting rejected<br>\n"); + } // close OO RADIUS_ACCOUNTING diff --git a/usr/local/captiveportal/radius_authentication.inc b/usr/local/captiveportal/radius_authentication.inc index 522dc22..728c93a 100644 --- a/usr/local/captiveportal/radius_authentication.inc +++ b/usr/local/captiveportal/radius_authentication.inc @@ -116,32 +116,23 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli if (PEAR::isError($result)) { $retvalue['auth_val'] = 1; $retvalue['error'] = $result->getMessage(); - if ($debug) - printf("Radius send failed: %s<br>\n", $retvalue['error']); + } else if ($result === true) { $retvalue['auth_val'] = 2; - if ($debug) - printf("Radius Auth succeeded<br>\n"); + } else { $retvalue['auth_val'] = 3; - if ($debug) - printf("Radius Auth rejected<br>\n"); + } // Get attributes, even if auth failed. // We will push the results in the retvalue array if (!$rauth->getAttributes()) { $retvalue['error'] = $rauth->getError(); - if ($debug) - printf("Radius getAttributes: No attributes<br>\n", $retvalue['error']); + } else { $retvalue = array_merge($retvalue,$rauth->listAttributes()); - if ($debug) { - if (!$rauth->listAttributes()) - printf("No Attributes<br>\n"); - else - print_r($rauth->listAttributes()); - } + // We convert the session_terminate_time to unixtimestamp if its set before returning the whole array to our caller if (!empty($retvalue['session_terminate_time'])) { $stt = &$retvalue['session_terminate_time']; |