STABLE2 - fence_scsi: correctly declare key_list

Ryan O'Hara rohara@fedoraproject.org
Mon Sep 29 14:16:00 GMT 2008


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=67067a37a9acc356a42c5f69bd3f7f39284f8ce1
Commit:        67067a37a9acc356a42c5f69bd3f7f39284f8ce1
Parent:        f7e66c1e6744ce02827539fd239b4ee7919f63b0
Author:        Ryan O'Hara <rohara@redhat.com>
AuthorDate:    Wed Sep 17 16:04:57 2008 -0500
Committer:     Ryan O'Hara <rohara@redhat.com>
CommitterDate: Mon Sep 29 08:31:05 2008 -0500

fence_scsi: correctly declare key_list

The key_list hash was not being declared in the get_key_list
subroutine, which was causing problem with the scope of the
variable. In short, Perl assumes that the scope of an undeclared
variable is global. This caused the contents of the has to remain
unchanged. (BZ 462628)
---
 fence/agents/scsi/fence_scsi.pl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 85d67d6..a02ac7a 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -269,6 +269,8 @@ sub get_key_list
 
     die "Unable to execute sg_persist.\n" if ($?>>8);
 
+    my %key_list;
+
     while (<$out>)
     {
 	chomp;



More information about the Cluster-cvs mailing list