This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
RHEL5 - fence_scsi: correctly declare key_list
- From: "Ryan O'Hara" <rohara at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Wed, 17 Sep 2008 21:08:51 +0000 (UTC)
- Subject: RHEL5 - fence_scsi: correctly declare key_list
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3d4256ce298e36bf245af16f0011773b670d8e6a
Commit: 3d4256ce298e36bf245af16f0011773b670d8e6a
Parent: 30e09c3d9c5ed72e39616270b842f6b0cac1940a
Author: Ryan O'Hara <rohara@redhat.com>
AuthorDate: Wed Sep 17 16:04:57 2008 -0500
Committer: Ryan O'Hara <rohara@redhat.com>
CommitterDate: Wed Sep 17 16:08:41 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 fd06031..62454c7 100755
--- 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;