1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-20 21:54:20 +01:00

Fix errors with our new logging code :(

This commit is contained in:
Fredrik Thulin 2012-06-15 11:59:42 +02:00
parent 64e9671b49
commit 38185be07d
2 changed files with 6 additions and 6 deletions

View File

@ -116,7 +116,7 @@ function retrieveURLasync ($ident, $urls, $logger, $ans_req=1, $match="^OK", $re
$ch = array();
foreach ($urls as $id => $url) {
$handle = curl_init();
$logger->log($ident . " adding URL : " . $url);
$logger->log(LOG_DEBUG, $ident . " adding URL : " . $url);
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_USERAGENT, "YK-VAL");
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
@ -137,16 +137,16 @@ function retrieveURLasync ($ident, $urls, $logger, $ans_req=1, $match="^OK", $re
;
while ($info = curl_multi_info_read($mh)) {
$logger->log($ident . " curl multi info : ", $info);
$logger->log(LOG_DEBUG, $ident . " curl multi info : ", $info);
if ($info['result'] == CURLE_OK) {
$str = curl_multi_getcontent($info['handle']);
$logger->log($ident . " curl multi content : " . $str);
$logger->log(LOG_DEBUG, $ident . " curl multi content : " . $str);
if (preg_match("/".$match."/", $str)) {
$logger->log($ident . " response matches " . $match);
$logger->log(LOG_DEBUG, $ident . " response matches " . $match);
$error = curl_error ($info['handle']);
$errno = curl_errno ($info['handle']);
$cinfo = curl_getinfo ($info['handle']);
$logger->log($ident . " errno/error: " . $errno . "/" . $error, $cinfo);
$logger->log(LOG_DEBUG, $ident . " errno/error: " . $errno . "/" . $error, $cinfo);
$ans_count++;
if ($returl) $ans_arr[]="url=" . $cinfo['url'] . "\n" . $str;
else $ans_arr[]=$str;

View File

@ -169,7 +169,7 @@ if ($localParams['active'] != 1) {
*/
$myLog->log(LOG_WARNING, 'Received sync-request for de-activated Yubikey ' . $yk_publicname .
' - check database synchronization!!!');
sendResp(S_BAD_OTP, $apiKey);
sendResp(S_BAD_OTP, $myLog, $apiKey);
exit;
}