From 42b988f735ce8a6cd284bcbbebe8491ae36896b2 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Mon, 2 Mar 2020 08:52:05 +0100 Subject: [PATCH] fix #2620: storage API: iSCSI: return active field as integer If active, the return value was a string: "1" and not an integer. Signed-off-by: Aaron Lauterer --- PVE/Storage/ISCSIPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage/ISCSIPlugin.pm b/PVE/Storage/ISCSIPlugin.pm index 131ffa0..bb27c89 100644 --- a/PVE/Storage/ISCSIPlugin.pm +++ b/PVE/Storage/ISCSIPlugin.pm @@ -353,7 +353,7 @@ sub status { $cache->{iscsi_sessions} = iscsi_session_list() if !$cache->{iscsi_sessions}; - my $active = defined($cache->{iscsi_sessions}->{$scfg->{target}}); + my $active = defined($cache->{iscsi_sessions}->{$scfg->{target}}) + 0; return (0, 0, 0, $active); }