[pve-devel] r5118 - pve-common/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Sep 10 17:48:20 CEST 2010


Author: dietmar
Date: 2010-09-10 15:48:20 +0000 (Fri, 10 Sep 2010)
New Revision: 5118

Modified:
   pve-common/trunk/ChangeLog
   pve-common/trunk/INotify.pm
Log:
	* INotify.pm (ccache_info): fix serious bug by duplicating cache info
	entry.



Modified: pve-common/trunk/ChangeLog
===================================================================
--- pve-common/trunk/ChangeLog	2010-09-10 14:36:37 UTC (rev 5117)
+++ pve-common/trunk/ChangeLog	2010-09-10 15:48:20 UTC (rev 5118)
@@ -1,5 +1,8 @@
 2010-09-10  Proxmox Support Team  <support at proxmox.com>
 
+	* INotify.pm (ccache_info): fix serious bug by duplicating cache info
+	entry.
+
 	* CLIHandler.pm (print_usage_short): group command by class
 
 	* JSONSchema.pm (register_standard_option, get_standard_option): a

Modified: pve-common/trunk/INotify.pm
===================================================================
--- pve-common/trunk/INotify.pm	2010-09-10 14:36:37 UTC (rev 5117)
+++ pve-common/trunk/INotify.pm	2010-09-10 15:48:20 UTC (rev 5118)
@@ -67,7 +67,14 @@
 	my $dir = $ccinfo->{dir};
 	my $regex = $ccinfo->{regex};
 	if ($filename =~ m|^$dir/+$regex$|) {
-	    return ($ccinfo, $filename);
+	    if (!$ccache->{$filename}) {
+		my $cp = {};
+		while (my ($k, $v) = each %$ccinfo) {
+		    $cp->{$k} = $v;
+		}
+		$ccache->{$filename} = $cp;
+	    } 
+	    return ($ccache->{$filename}, $filename);
 	}
     }
  
@@ -197,7 +204,7 @@
     my $parser;
 
     my ($ccinfo, $filename) = ccache_info($fileid);
-    
+     
     $parser = $ccinfo->{parser};
  
     my $fd;



More information about the pve-devel mailing list