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

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;


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

only message in thread, other threads:[~2008-09-29 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 14:16 STABLE2 - 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).