1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-01-20 10:52:15 +01:00

Remove rowCount entries instead, it reset the search result.

This commit is contained in:
Simon Josefsson 2011-11-14 11:00:30 +00:00
parent 72a001072b
commit 13a312191b

View File

@ -290,12 +290,10 @@ class SyncLib
/* Loop over all unique servers in queue */ /* Loop over all unique servers in queue */
$queued_limit=time()-$older_than; $queued_limit=time()-$older_than;
$res=$this->db->customQuery("select distinct server from queue WHERE queued < " . $queued_limit . " or queued is null"); $res=$this->db->customQuery("select distinct server from queue WHERE queued < " . $queued_limit . " or queued is null");
$this->log(LOG_INFO, "found " . $this->db->rowCount() . " unique servers");
foreach ($res as $my_server) { foreach ($res as $my_server) {
$this->log(LOG_INFO, "Sending queue request to server on server " . $my_server['server']); $this->log(LOG_INFO, "Sending queue request to server on server " . $my_server['server']);
$res=$this->db->customQuery("select * from queue WHERE (queued < " . $queued_limit . " or queued is null) and server='" . $my_server['server'] . "'"); $res=$this->db->customQuery("select * from queue WHERE (queued < " . $queued_limit . " or queued is null) and server='" . $my_server['server'] . "'");
$this->log(LOG_INFO, "found " . $this->db->rowCount() . " queue entries");
while ($entry=$res->fetch(PDO::FETCH_ASSOC)) { while ($entry=$res->fetch(PDO::FETCH_ASSOC)) {
$this->log(LOG_INFO, "server=" . $entry['server'] . " , info=" . $entry['info']); $this->log(LOG_INFO, "server=" . $entry['server'] . " , info=" . $entry['info']);