[PATCHv2,5/7] ddns.cgi, wio.cgi: Use GetDyndnsRedIP from http-client-functions.pl file
Commit Message
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
html/cgi-bin/ddns.cgi | 3 ++-
html/cgi-bin/wio.cgi | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
@@ -29,6 +29,7 @@ use experimental 'smartmatch';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+require "${General::swroot}/http-client-functions.pl";
#workaround to suppress a warning when a variable is used only once
my @dummy = ( ${Header::table2colour}, ${Header::colouryellow} );
@@ -559,7 +560,7 @@ open(FILE, $datafile) or die "Unable to open $datafile.";
close(FILE);
# Get IP address of the red interface.
-my $ip = &General::GetDyndnsRedIP();
+my $ip = &HTTPClient::GetDyndnsRedIP();
my $id = 0;
my $toggle_enabled;
@@ -50,6 +50,7 @@ require '/var/ipfire/general-functions.pl';
require '/var/ipfire/network-functions.pl';
require '/var/ipfire/lang.pl';
require '/var/ipfire/header.pl';
+require '/var/ipfire/http-client-functions.pl';
require '/usr/lib/wio/wio-lib.pl';
require '/usr/lib/wio/wio-graphs.pl';
@@ -1163,7 +1164,7 @@ close (FILE);
@temp = split (/\,/, $_);
if ( $temp[7] eq "on" ) {
- $bgcolor = ( &General::DyndnsServiceSync (&General::GetDyndnsRedIP,$temp[1],$temp[2]) ? "$Header::colourgreen" : "$Header::colourred" );
+ $bgcolor = ( &General::DyndnsServiceSync (&HTTPClient::GetDyndnsRedIP,$temp[1],$temp[2]) ? "$Header::colourgreen" : "$Header::colourred" );
}
else {
$bgcolor = "blue";