summaryrefslogtreecommitdiff
path: root/source3/smbd/smbXsrv_tcon.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-06-12 20:22:54 +0200
committerMichael Adam <obnox@samba.org>2014-09-19 09:15:12 +0200
commit333707fa376cc27476d1fef2d291c6ae6482b1d6 (patch)
tree4d57e996e6f3a0c9b12d5a3538280e9cca43cd13 /source3/smbd/smbXsrv_tcon.c
parent1d615ee923a2b46ffd7f943a9ba9e362b6322e5e (diff)
downloadsamba-333707fa376cc27476d1fef2d291c6ae6482b1d6.tar.gz
s3:smbd: move smbXsrv_{session,tcon,open} tables to smbXsrv_client
These should be per client (based on the SMB >= 2.1 client_guid), this is a preparation for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/smbd/smbXsrv_tcon.c')
-rw-r--r--source3/smbd/smbXsrv_tcon.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source3/smbd/smbXsrv_tcon.c b/source3/smbd/smbXsrv_tcon.c
index 353f09056f0..8d0c292b0ab 100644
--- a/source3/smbd/smbXsrv_tcon.c
+++ b/source3/smbd/smbXsrv_tcon.c
@@ -1071,15 +1071,17 @@ static int smbXsrv_tcon_disconnect_all_callback(struct db_record *local_rec,
NTSTATUS smb1srv_tcon_table_init(struct smbXsrv_connection *conn)
{
+ struct smbXsrv_client *client = conn->client;
+
/*
* Allow a range from 1..65534 with 65534 values.
*/
- conn->tcon_table = talloc_zero(conn, struct smbXsrv_tcon_table);
- if (conn->tcon_table == NULL) {
+ client->tcon_table = talloc_zero(client, struct smbXsrv_tcon_table);
+ if (client->tcon_table == NULL) {
return NT_STATUS_NO_MEMORY;
}
- return smbXsrv_tcon_table_init(conn, conn->tcon_table,
+ return smbXsrv_tcon_table_init(client, client->tcon_table,
1, UINT16_MAX - 1,
UINT16_MAX - 1);
}
@@ -1090,7 +1092,7 @@ NTSTATUS smb1srv_tcon_create(struct smbXsrv_connection *conn,
{
struct server_id id = messaging_server_id(conn->msg_ctx);
- return smbXsrv_tcon_create(conn->tcon_table,
+ return smbXsrv_tcon_create(conn->client->tcon_table,
conn->protocol,
id, now, _tcon);
}
@@ -1101,12 +1103,14 @@ NTSTATUS smb1srv_tcon_lookup(struct smbXsrv_connection *conn,
{
uint32_t local_id = tree_id;
- return smbXsrv_tcon_local_lookup(conn->tcon_table,
+ return smbXsrv_tcon_local_lookup(conn->client->tcon_table,
local_id, now, tcon);
}
NTSTATUS smb1srv_tcon_disconnect_all(struct smbXsrv_connection *conn)
{
+ struct smbXsrv_client *client = conn->client;
+
/*
* We do not pass a vuid here,
* which means the vuid is taken from
@@ -1121,7 +1125,7 @@ NTSTATUS smb1srv_tcon_disconnect_all(struct smbXsrv_connection *conn)
* conn_close_all(), but we should think
* about how to fix this in future.
*/
- return smbXsrv_tcon_disconnect_all(conn->tcon_table, 0);
+ return smbXsrv_tcon_disconnect_all(client->tcon_table, 0);
}
NTSTATUS smb2srv_tcon_table_init(struct smbXsrv_session *session)