Commit 85814f63 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Fixed new CLASS to CLASS->new

parent 57bded4d
# SQL config database support # SQL config database support
# Copyright (C) 2007-2011, AllWorldIT # Copyright (C) 2007-2016, AllWorldIT
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -199,7 +199,7 @@ sub getConfig ...@@ -199,7 +199,7 @@ sub getConfig
# Extract realm from username # Extract realm from username
if (defined($user->{'Username'}) && $user->{'Username'} =~ /^\S+@(\S+)$/) { if (defined($user->{'Username'}) && $user->{'Username'} =~ /^\S+@(\S+)$/) {
$realmName = $1; $realmName = $1;
$server->log(LOG_DEBUG,"Processing realm attributes for '$realmName'"); $server->log(LOG_DEBUG,"Processing realm attributes for '$realmName'");
$sth = DBSelect($config->{'get_config_realm_id_query'},$realmName); $sth = DBSelect($config->{'get_config_realm_id_query'},$realmName);
...@@ -264,7 +264,6 @@ sub getConfig ...@@ -264,7 +264,6 @@ sub getConfig
# Grab peer address object # Grab peer address object
my $peerAddrObj = AWITPT::NetIP->new($server->{'server'}{'peeraddr'}); my $peerAddrObj = AWITPT::NetIP->new($server->{'server'}{'peeraddr'});
# Check if we know this client # Check if we know this client
my @accessList; my @accessList;
while (my $row = $sth->fetchrow_hashref()) { while (my $row = $sth->fetchrow_hashref()) {
...@@ -274,9 +273,9 @@ sub getConfig ...@@ -274,9 +273,9 @@ sub getConfig
@accessList = split(',',$res->{'AccessList'}); @accessList = split(',',$res->{'AccessList'});
# Loop with what we get and check if we have match # Loop with what we get and check if we have match
foreach my $range (@accessList) { foreach my $range (@accessList) {
my $rangeObj = new AWITPT::NetIP->new($range); my $rangeObj = AWITPT::NetIP->new($range);
# Check for match # Check for match
if ($peerAddrObj->is_within($rangeObj)) { if ($peerAddrObj->is_within($rangeObj)) {
$clientID = $res->{'ID'}; $clientID = $res->{'ID'};
$server->log(LOG_INFO,"(SETCACHE) Got client ID '$clientID' from DB"); $server->log(LOG_INFO,"(SETCACHE) Got client ID '$clientID' from DB");
last; last;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment