From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZfC1B2Qd5z33BT for ; Fri, 18 Apr 2025 11:18:06 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZfC151YStz3348 for ; Fri, 18 Apr 2025 11:18:01 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZfC134KdYz38X; Fri, 18 Apr 2025 11:17:59 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1744975079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h6z2RWSSN0OxK4mEJGGLqE35KhY6J8fYTdvjxI83Yg0=; b=p4mMWIXbumDT9r+TgYV2Bdg06oM726KFeXBDyTitDnEiOhgkCuhFAmrRcKPmZjXpX3afeQ D1k/wMPrPGVycLDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1744975079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h6z2RWSSN0OxK4mEJGGLqE35KhY6J8fYTdvjxI83Yg0=; b=totx9xXMS9rLzwqi6LfSLNchYnGbBmHHg6D20rGYu/5TK8bGdczgZ45ffooFw5f3VW3/qw bnjSDCQ1c7xfIy/yRQziRrMQ/qGO3VnFpd77X8ugPBt95mL7McsM7tWDIIPmF8P0u7nntT /mlYPT6SrOBRaMvQO/U7f8zFmAKfZYzD7WGHYV0BY6N3TVNNkhcZti6wmC4CVuFXdArx9S qH2j0J0dEujgkqHhjST9PGsgThiv3mQW1grb+FJia8Qm1yb3Tz5zM328bLWb/fuLcqtLY2 reYl8IDvsOWE0bL8lhvrnHXBS3QRN42tpvjD/bz23t8dNiJocgT3DZGRGEOVYg== From: Stefan Schantl To: development@lists.ipfire.org Cc: Stefan Schantl Subject: [PATCHv2 5/7] ddns.cgi, wio.cgi: Use GetDyndnsRedIP from http-client-functions.pl file Date: Fri, 18 Apr 2025 12:54:44 +0200 Message-ID: <20250418110741.7756-6-stefan.schantl@ipfire.org> In-Reply-To: <20250418110741.7756-1-stefan.schantl@ipfire.org> References: <20250418110741.7756-1-stefan.schantl@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Schantl --- html/cgi-bin/ddns.cgi | 3 ++- html/cgi-bin/wio.cgi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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"; -- 2.47.2