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:37 +0100 |
commit | 046d253a34d74c794d7ed44b241c79a01fe86b20 (patch) | |
tree | b9498a930c0bd769bedcfa5a25edaa538b74d6fa | |
parent | 5afffea4725a28e3cd21d8b8846e552d3ef1ad87 (diff) | |
download | pfsense-046d253a34d74c794d7ed44b241c79a01fe86b20.zip pfsense-046d253a34d74c794d7ed44b241c79a01fe86b20.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.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"); |