summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/ipsec.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index 349ce43..d6e2669 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -382,10 +382,17 @@ function ipsec_smp_dump_status() {
$response = "";
while (!strstr($sread, "</message>")) {
$sread = fgets($fd);
+ if ($sread === false)
+ break;
$response .= $sread;
}
fclose($fd);
+ if ($sread === false) {
+ log_error("Error during reading of status from IPsec");
+ return;
+ }
+
@file_put_contents("{$g['tmp_path']}/smp_status.xml", $response);
unset($response, $sread);
OpenPOWER on IntegriCloud