public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* RHEL5 - fence_scsi: correctly declare key_list
@ 2008-09-17 21:11 Ryan O'Hara
  0 siblings, 0 replies; only message in thread
From: Ryan O'Hara @ 2008-09-17 21:11 UTC (permalink / raw)
  To: cluster-cvs-relay

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-17 21:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-17 21:11 RHEL5 - fence_scsi: correctly declare key_list Ryan O'Hara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).