From 32c94e92566faa681a1751751673211cbd855fb9 Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Thu, 14 Jun 2012 14:55:07 +0200 Subject: [PATCH] Use retrieveURLasync in ykval-common instead. --- ykval-synclib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ykval-synclib.php b/ykval-synclib.php index 2627b20..6c96317 100644 --- a/ykval-synclib.php +++ b/ykval-synclib.php @@ -406,7 +406,7 @@ class SyncLib /* Send out requests */ - $ans_arr=$this->retrieveURLasync($urls, $ans_req, $timeout); + $ans_arr=$this->retrieveURLasync_wrap($urls, $ans_req, $timeout); if (!is_array($ans_arr)) { $this->log(LOG_WARNING, 'No responses from validation server pool'); @@ -510,6 +510,10 @@ class SyncLib else return 0; } + function retrieveURLasync_wrap ($urls, $ans_req=1, $timeout=1.0) + { + return retrieveURLasync("YK-VAL sync", $urls, $ans_req, $match="status=OK", $returl=True, $timeout); + } /* This function takes a list of URLs. It will return the content of @@ -520,7 +524,7 @@ class SyncLib URLs fail, data from some URL that did not match parameter $match (defaults to ^OK) is returned, or if all URLs failed, false. */ - function retrieveURLasync ($urls, $ans_req=1, $timeout=1.0) { + function retrieveURLasync_old ($urls, $ans_req=1, $timeout=1.0) { $mh = curl_multi_init(); $ch = array();