[pve-devel] applied-series: [PATCH storage 1/2] fix #2620: storage API: iSCSI: return active field as integer
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Mar 3 11:36:39 CET 2020
On 3/2/20 8:52 AM, Aaron Lauterer wrote:
> If active, the return value was a string: "1" and not an integer.
>
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
> 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);
> }
>
applied both patches, thanks!
More information about the pve-devel
mailing list