]> git.proxmox.com Git - pve-guest-common.git/commitdiff
replication: sort time stamps numerically
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 28 Jun 2017 07:02:29 +0000 (09:02 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 07:52:17 +0000 (09:52 +0200)
PVE/ReplicationState.pm

index b817f08cc8b2aedf4d559bdf402e668d2864c6e3..74c95f9bf7192a130560764164a54c08508775b4 100644 (file)
@@ -299,7 +299,7 @@ sub get_next_job {
        my $jobb = $jobs->{$b};
        my $sa =  $joba->{state};
        my $sb =  $jobb->{state};
-       my $res = $sa->{last_iteration} cmp $sb->{last_iteration};
+       my $res = $sa->{last_iteration} <=> $sb->{last_iteration};
        return $res if $res != 0;
        $res = $joba->{next_sync} <=> $jobb->{next_sync};
        return $res if $res != 0;