/[smeserver]/rpms/e-smith-lib/sme8/e-smith-lib-2.2.0-serialize_peers.patch
ViewVC logotype

Annotation of /rpms/e-smith-lib/sme8/e-smith-lib-2.2.0-serialize_peers.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Oct 11 22:27:51 2010 UTC (13 years, 7 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-lib-2_2_0-7_el5_sme, e-smith-lib-2_2_0-9_el5_sme, e-smith-lib-2_2_0-10_el5_sme, e-smith-lib-2_2_0-8_el5_sme, HEAD
* Mon Oct 11 2010 Shad L. Lords <slords@mail.com> 2.2.0-7.sme
- Serialize configure_peers to prevent errors [SME: 5831]

1 slords 1.1 diff -up e-smith-lib-2.2.0/root/usr/lib/perl5/site_perl/esmith/tcpsvd.pm.serialize_peers e-smith-lib-2.2.0/root/usr/lib/perl5/site_perl/esmith/tcpsvd.pm
2     --- e-smith-lib-2.2.0/root/usr/lib/perl5/site_perl/esmith/tcpsvd.pm.serialize_peers 2007-01-26 18:51:29.000000000 -0700
3     +++ e-smith-lib-2.2.0/root/usr/lib/perl5/site_perl/esmith/tcpsvd.pm 2010-10-11 16:25:37.000000000 -0600
4     @@ -29,6 +29,7 @@ Pape's ipsvd package - see http://smarde
5     use esmith::NetworksDB;
6     use esmith::ConfigDB;
7     use esmith::util;
8     +use esmith::lockfile;
9     use Carp;
10    
11     =head2 configure_peers($service [, $peers_directory] )
12     @@ -95,6 +96,8 @@ sub configure_peers
13    
14     $nets{'127.0.0.1'} = 1;
15    
16     + # Setup lock on peers directory while we manipulate it
17     + my $lock = esmith::lockfile::LockFileOrWait("$peers/local");
18    
19     # Now manage a set of symlinks to the "local" instructions file
20     foreach my $insfile (readdir (PEERS))
21     @@ -129,6 +132,9 @@ sub configure_peers
22     symlink "0", "$peers/$gw_ip" or
23     warn "Cannot add instructions file for $peers/$gw_ip: $!\n";
24     }
25     +
26     + # Unlock peers directory
27     + $lock && esmith::lockfile::UnlockFile($lock);
28     }
29    
30     1;

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