]> git.proxmox.com Git - pve-storage.git/commitdiff
fix #2620: storage API: iSCSI: return active field as integer
authorAaron Lauterer <a.lauterer@proxmox.com>
Mon, 2 Mar 2020 07:52:05 +0000 (08:52 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 3 Mar 2020 10:33:34 +0000 (11:33 +0100)
If active, the return value was a string: "1" and not an integer.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
PVE/Storage/ISCSIPlugin.pm

index 131ffa0f87003c4dbe8318ebda41bc85ed81e512..bb27c89ca25ea5922fd1f7ca7b371160a55f6d46 100644 (file)
@@ -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);
 }