]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Fix a problem in failed_logins when NASIPAddress is not set.
authorkkalev <kkalev>
Tue, 1 Oct 2002 19:16:06 +0000 (19:16 +0000)
committerkkalev <kkalev>
Tue, 1 Oct 2002 19:16:06 +0000 (19:16 +0000)
Changelog
htdocs/failed_logins.php3

index 0debab49386dcaae2a964bf919d5da99a5f65a10..aaeb8822beae5e1adc648fa91d27bd75d505b68e 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -20,6 +20,7 @@ Ver 1.60:
   function for each online user so we now don't need to do a lot of calls to time() but only one. That should make
   user_finger somewhat faster.
 * Fix a small issue with the general_accounting_info_order
+* Fix a problem in failed_logins when NASIPAddress is not set.
 Ver 1.59:
 * Small html fixes in user_edit.php3 and password.php3
 * Show number of failed logins in the last 7 days in the user admin page
index 45701f9fa34c3883a5dfce02fa4f0f829782ae72..98aa17acb01934314f6d051d70ee86a22a2620da 100644 (file)
@@ -97,16 +97,23 @@ if ($link){
                        else
                                $acct_login = "<a href=\"user_admin.php3?login=$acct_login\" title=\"Edit user $acct_login\">$acct_login</a>";
                        $acct_time = $row[AcctStopTime];
-                       $acct_server = $da_name_cache[$row[NASIPAddress]];
-                       if (!isset($acct_server)){
-                               $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');
+                       $acct_server = $row[NASIPAddress];
+                       if ($acct_server != ''){
+                               $acct_server = $da_name_cache[$acct_server];
+                               if (!isset($acct_server)){
+                                       $acct_server = $row[NASIPAddress];
+                                       $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');
+                                       }
+                                       else
+                                               $da_name_cache[$row[NASIPAddress]] = $acct_server;
+                                       }
                                }
-                               else
-                                       $da_name_cache[$row[NASIPAddress]] = $acct_server;
                        }
+                       else
+                               $acct_server = '-';
                        $acct_server = "$acct_server:$row[NASPortId]";
                        $acct_terminate_cause = "$row[AcctTerminateCause]";
                        if ($acct_terminate_cause == '')