/[smecontribs]/rpms/smeserver-affa/contribs7/smeserver-affa-0.10.0-DNS_Timeout.patch
ViewVC logotype

Contents of /rpms/smeserver-affa/contribs7/smeserver-affa-0.10.0-DNS_Timeout.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Mar 11 10:55:06 2008 UTC (16 years, 8 months ago) by mweinber
Branch: MAIN
CVS Tags: smeserver-affa-0_10_0-1_el4_sme, smeserver-affa-0_10_0-2_el4_sme
Affa: oncreased release number

1 --- smeserver-affa-0.10.0/root/sbin/e-smith/affa.DNS_Timeout 2008-03-10 18:41:52.000000000 +0100
2 +++ smeserver-affa-0.10.0/root/sbin/e-smith/affa 2008-03-11 09:55:26.000000000 +0100
3 @@ -635,15 +635,23 @@
4
5 # check for remoteHostName==localhost using DNS
6 my $res = Net::DNS::Resolver->new;
7 - my $query = $res->search($job{'remoteHostName'});
8 - if ($query)
9 + $res->udp_timeout(10);
10 + if( $job{'remoteHostName'} ne 'localhost' )
11 {
12 - foreach my $rr ($query->answer)
13 + my $query = $res->search($job{'remoteHostName'});
14 + if ($query)
15 {
16 - next unless $rr->type eq "A";
17 - $job{'remoteHostName'}='localhost' if( $rr->address eq $LocalIP );
18 - }
19 - }
20 + foreach my $rr ($query->answer)
21 + {
22 + next unless $rr->type eq "A";
23 + $job{'remoteHostName'}='localhost' if( $rr->address eq $LocalIP );
24 + }
25 + }
26 + else
27 + {
28 + lg('Warning: DNS resolver timeout');
29 + }
30 + }
31 # check for remoteHostName==localhost using e-smith DB
32 if( $job{'remoteHostName'} =~ /^(127.0.0.1|$LocalIP|$SystemName|$SystemName\.$DomainName)$/ )
33 {

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed