summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-12-24 18:59:21 +0100
committerErmal LUÇI <eri@pfsense.org>2014-12-24 18:59:21 +0100
commit35d17581b1bd21dfc325c2a59174bd3beb416a27 (patch)
tree2230a5e75a4fc11d62c2140c3c5c6e50fce9f4bb
parentc607f3060a661987b7d81565466722b4876b6fd6 (diff)
downloadpfsense-35d17581b1bd21dfc325c2a59174bd3beb416a27.zip
pfsense-35d17581b1bd21dfc325c2a59174bd3beb416a27.tar.gz
Fixes #4130 Check for a certain size of file to start showing data on dashboard and avoiding xml parser errors
-rw-r--r--etc/inc/ipsec.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index 6b07187..349ce43 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -515,6 +515,10 @@ function ipsec_dump_mobile() {
return array();
}
+ /* This is needed for fixing #4130 */
+ if (filesize("{$g['tmp_path']}/strongswan_leases.xml") < 200)
+ return array();
+
$custom_listtags = array('lease', 'pool');
$response = parse_xml_config("{$g['tmp_path']}/strongswan_leases.xml", "leases");
@unlink("{$g['tmp_path']}/strongswan_leases.xml");
OpenPOWER on IntegriCloud