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

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ba4f1ae75aa5fe691cb44286be4f695b4ddf0a4e
Commit:        ba4f1ae75aa5fe691cb44286be4f695b4ddf0a4e
Parent:        1435375be611bd29ccd22493d6681fdfde0744d7
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 09:31:14 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 a67a57a..80066a3 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -281,6 +281,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 14: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:48 master - 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).