diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-12-24 18:59:21 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-12-24 18:59:21 +0100 |
commit | 35d17581b1bd21dfc325c2a59174bd3beb416a27 (patch) | |
tree | 2230a5e75a4fc11d62c2140c3c5c6e50fce9f4bb /etc | |
parent | c607f3060a661987b7d81565466722b4876b6fd6 (diff) | |
download | pfsense-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
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/ipsec.inc | 4 |
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"); |