smbstatus: Use share_mode_data->leases
authorVolker Lendecke <vl@samba.org>
Wed, 25 Jul 2018 14:59:53 +0000 (16:59 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 26 Jul 2018 20:44:25 +0000 (22:44 +0200)
This is the only user of share_mode_entry->lease

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/status.c

index 9f8729c2910f1d45cef8c7941d1c2cb2454fe346..811eb7b492ba9be7a51e83bd06183b028f22401e 100644 (file)
@@ -180,7 +180,8 @@ static int print_share_mode(struct file_id fid,
                } else if (e->op_type & LEVEL_II_OPLOCK) {
                        d_printf("LEVEL_II        ");
                } else if (e->op_type == LEASE_OPLOCK) {
-                       uint32_t lstate = e->lease->current_state;
+                       struct share_mode_lease *l = &d->leases[e->lease_idx];
+                       uint32_t lstate = l->current_state;
                        d_printf("LEASE(%s%s%s)%s%s%s      ",
                                 (lstate & SMB2_LEASE_READ)?"R":"",
                                 (lstate & SMB2_LEASE_WRITE)?"W":"",