From: Stefan Schantl Date: Fri, 18 Apr 2025 10:15:00 +0000 (+0200) Subject: ddns.cgi, wio.cgi: Use GetDyndnsRedIP from http-client-functions.pl file X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8dae31d28a7104e5b86943b24b1bb586aa4b1a96;p=people%2Fstevee%2Fipfire-2.x.git ddns.cgi, wio.cgi: Use GetDyndnsRedIP from http-client-functions.pl file Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index 0e3ccbe45..34475b75c 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -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; diff --git a/html/cgi-bin/wio.cgi b/html/cgi-bin/wio.cgi index f31f5d565..30a51104c 100644 --- a/html/cgi-bin/wio.cgi +++ b/html/cgi-bin/wio.cgi @@ -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";