From 6f08a272fda18bb80b691495c416ab6a9bf5d479 Mon Sep 17 00:00:00 2001 From: Christoffer Date: Tue, 18 Dec 2018 13:04:43 +0000 Subject: [PATCH] Bug: fix error in write* functions --- _functions.php | 6 +++--- rfc8416.php | 3 +-- roagen.php | 7 +++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/_functions.php b/_functions.php index 16b757a..5d98234 100755 --- a/_functions.php +++ b/_functions.php @@ -75,7 +75,7 @@ function commitPushToRemotes () echo shell_exec ("./update.sh 2>&1"); } -function writeBirdConfig () +function writeBirdConfig ($json, $roas) { $fq = fopen ('roa/bird_roa_dn42.conf', 'w'); $fq4 = fopen ('roa/bird4_roa_dn42.conf', 'w'); @@ -106,7 +106,7 @@ function writeBirdConfig () fclose ($fq6); } -function writeRoutinatorExceptionFile () +function writeRoutinatorExceptionFile ($json) { $fp = fopen('roa/export_rfc8416_dn42.json', 'w'); @@ -115,7 +115,7 @@ function writeRoutinatorExceptionFile () fclose($fp); } -function writeExportJSON () +function writeExportJSON ($json) { $fp = fopen ('roa/export_dn42.json', 'w'); diff --git a/rfc8416.php b/rfc8416.php index d27bf22..915abf5 100755 --- a/rfc8416.php +++ b/rfc8416.php @@ -217,9 +217,8 @@ foreach ($raw_array as $sub_array) // Do JSON encoding before writing result to file $json = json_encode($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK); -writeRoutinatorExceptionFile(); +writeRoutinatorExceptionFile($json); -// Commit and push to all git remote repositories commitPushToRemotes(); ?> diff --git a/roagen.php b/roagen.php index ab959af..9d73614 100755 --- a/roagen.php +++ b/roagen.php @@ -1,5 +1,8 @@