]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Call gethostbyaddr with an @ in front to suppress error messages
authorkkalev <kkalev>
Wed, 12 Mar 2003 15:57:57 +0000 (15:57 +0000)
committerkkalev <kkalev>
Wed, 12 Mar 2003 15:57:57 +0000 (15:57 +0000)
Changelog
htdocs/failed_logins.php3
htdocs/user_accounting.php3
htdocs/user_admin.php3
htdocs/user_stats.php3

index 02f46452ffc6a4ada8360cb38b268ebce1fdbb78..d6bfcbaad73e26d325296d80bbfec83ac2f7f9cf 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -58,6 +58,7 @@ Ver 1.62:
   on the data in the totacct table.
 * Add a few comments in the tot_stats and monthly_tot_stats scripts
 * Add support for ! in usernames in log_badlogins
+* Call gethostbyaddr with an @ in front to suppress error messages
 Ver 1.61:
 * Add a string encoder for greek
 * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
index 028ca99b0bf9a6e8541cd187f309543935b0d918..1e6f8e23364e76f4a5cafc2e19e2e2a935e1868b 100644 (file)
@@ -106,7 +106,7 @@ if ($link){
                                $acct_server = $da_name_cache[$acct_server];
                                if (!isset($acct_server)){
                                        $acct_server = $row[NASIPAddress];
-                                       $acct_server = gethostbyaddr($acct_server);
+                                       $acct_server = @gethostbyaddr($acct_server);
                                        if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
                                                $da_name_cache[$row[NASIPAddress]] = $acct_server;
                                                session_register('da_name_cache');
index ca074326d4e3a9f618c467b7e4b931ff1ab3c9bc..37a8229b6e3e912f8b96e8d21f210719fcdcf9a9 100644 (file)
@@ -109,7 +109,7 @@ if ($link){
                        if ($acct_server != ''){
                                $acct_server = $da_name_cache[$row[NASIPAddress]];
                                if (!isset($acct_server)){
-                                       $acct_server = gethostbyaddr($row[NASIPAddress]);
+                                       $acct_server = @gethostbyaddr($row[NASIPAddress]);
                                        if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
                                                $da_name_cache[$row[NASIPAddress]] = $acct_server;
                                                session_register('da_name_cache');
index 5a1ef99a11d675f4404bdccf6df7b4a8e7a71fa7..cbb5d671f91b7569d1a44fbdec80f2e4f16682e5 100644 (file)
@@ -183,8 +183,8 @@ if ($link){
                        $lastlog_session_time_jvs = 1000 * $lastlog_session_time;
                        $lastlog_session_time = time2strclock($lastlog_session_time);
                        $lastlog_client_ip = $row['FramedIPAddress'];   
-                       $lastlog_server_name = gethostbyaddr($lastlog_server_ip);
-                       $lastlog_client_name = gethostbyaddr($lastlog_client_ip);
+                       $lastlog_server_name = @gethostbyaddr($lastlog_server_ip);
+                       $lastlog_client_name = @gethostbyaddr($lastlog_client_ip);
                        $lastlog_callerid = $row['CallingStationId'];
                        if ($lastlog_callerid == '')
                                $lastlog_callerid = 'not available';
@@ -215,8 +215,8 @@ if ($link){
                                $lastlog_server_port = $row['NASPortId'];
                                $lastlog_session_time = time2str($row['AcctSessionTime']);
                                $lastlog_client_ip = $row['FramedIPAddress'];   
-               $lastlog_server_name = ($lastlog_server_ip != '') ? gethostbyaddr($lastlog_server_ip) : '-';
-               $lastlog_client_name = ($lastlog_client_ip != '') ? gethostbyaddr($lastlog_client_ip) : '-';
+               $lastlog_server_name = ($lastlog_server_ip != '') ? @gethostbyaddr($lastlog_server_ip) : '-';
+               $lastlog_client_name = ($lastlog_client_ip != '') ? @gethostbyaddr($lastlog_client_ip) : '-';
                                $lastlog_callerid = $row['CallingStationId'];
                                if ($lastlog_callerid == '')
                                        $lastlog_callerid = 'not available';
index 620d13bcce9e5f580ca227775fcbb8bd06715d84..1892bb1fb1b408679ea7f0ba8f4aadef5254e0d5 100644 (file)
@@ -111,7 +111,7 @@ if ($link){
                        $acct_download = bytes2str($acct_download);
                        $acct_server = $da_name_cache[$row[NASIPAddress]];
                        if (!isset($acct_server)){
-                               $acct_server = gethostbyaddr($row[NASIPAddress]);
+                               $acct_server = @gethostbyaddr($row[NASIPAddress]);
                                if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
                                        $da_name_cache[$row[NASIPAddress]] = $acct_server;
                                        session_register('da_name_cache');