summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-02 17:06:08 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-02 17:06:08 +0000
commit355aa195d61cb12f33417487225949cb50d484b4 (patch)
treec7b5302e224a8fd5a5eea098acee5a32a5273872 /usr/local/www/widgets
parent22dde6eb2c977d3af2441cde3e0d8e570c06977f (diff)
downloadpfsense-355aa195d61cb12f33417487225949cb50d484b4.zip
pfsense-355aa195d61cb12f33417487225949cb50d484b4.tar.gz
Use host with a timeout of 1 second to query the update ip address.
If we cannot resolve the IP address within 1 second show that an update is not available instead of hanging the webConfigurator while waiting for DNS timeouts.
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index 1774d0b..d65c469 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -61,7 +61,13 @@ $curcfg = $config['system']['firmware'];
else
$updater_url = $g['update_url'];
- $latest_version = download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
+ /* ensure we can obtain the DNS information quickly */
+ $host = split("/", $updater_url);
+ $test_dns = `/usr/bin/host -W1 {$host[2]} | grep "has address" | awk '{ print $4 }' | wc -l`;
+ if($test_dns)
+ $latest_version = download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
+ else
+ $latest_version ="404";
if(strstr($latest_version,"404")) {
echo "<br /><br />Unable to check for updates.";
OpenPOWER on IntegriCloud