DEBUG(1, ("lease break timed out for file %s -- replying anyway\n",
fsp_str_dbg(fsp)));
- (void)downgrade_lease(lease->sconn->client->connections,
+ (void)downgrade_lease(lease->sconn->client,
1,
&fsp->file_id,
&lease->lease.lease_key,
struct downgrade_lease_additional_state {
struct tevent_immediate *im;
- struct smbXsrv_connection *xconn;
+ struct smbXsrv_client *client;
uint32_t break_flags;
struct smb2_lease_key lease_key;
uint32_t break_from;
struct downgrade_lease_additional_state *state =
talloc_get_type_abort(private_data,
struct downgrade_lease_additional_state);
- struct smbXsrv_connection *xconn = state->xconn;
+ struct smbXsrv_connection *xconn = state->client->connections;
NTSTATUS status;
status = smbd_smb2_send_lease_break(xconn,
state->break_to);
TALLOC_FREE(state);
if (!NT_STATUS_IS_OK(status)) {
- smbd_server_connection_terminate(xconn,
- nt_errstr(status));
+ smbd_server_disconnect_client(state->client,
+ nt_errstr(status));
return;
}
}
files_forall(sconn, fsps_lease_update_fn, &state);
}
-NTSTATUS downgrade_lease(struct smbXsrv_connection *xconn,
+NTSTATUS downgrade_lease(struct smbXsrv_client *client,
uint32_t num_file_ids,
const struct file_id *ids,
const struct smb2_lease_key *key,
uint32_t lease_state)
{
+ struct smbXsrv_connection *xconn = client->connections;
struct smbd_server_connection *sconn = xconn->client->sconn;
const struct GUID *client_guid = NULL;
struct share_mode_lock *lck;
breaking_to_requested |= SMB2_LEASE_READ;
}
- state = talloc_zero(xconn,
+ state = talloc_zero(client,
struct downgrade_lease_additional_state);
if (state == NULL) {
TALLOC_FREE(lck);
return NT_STATUS_NO_MEMORY;
}
- state->xconn = xconn;
+ state->client = client;
state->lease_key = *key;
state->break_from = current_state;
state->break_to = breaking_to_requested;
/* The following definitions come from smbd/signing.c */
+struct smbXsrv_client;
struct smbXsrv_connection;
struct dcesrv_context;
bool remove_oplock(files_struct *fsp);
bool downgrade_oplock(files_struct *fsp);
bool fsp_lease_update(struct files_struct *fsp);
-NTSTATUS downgrade_lease(struct smbXsrv_connection *xconn,
+NTSTATUS downgrade_lease(struct smbXsrv_client *client,
uint32_t num_file_ids,
const struct file_id *ids,
const struct smb2_lease_key *key,