/[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.2 - (show annotations) (download)
Sun Apr 6 14:57:52 2008 UTC (16 years, 7 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
Import on branch contribs7 of package smeserver-affa-1.0.0-1.el4.sme.src.rpm

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