summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-11-18 12:20:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:26 -0500
commit509be8d902038ec2a75ece5fd28d43d73218f0b2 (patch)
tree6096ab41cfabb48aa510440055c69622705ed96e /source4/smb_server
parentd5f37ecf94e2b63511102b3fd34c0e7bcd8d7879 (diff)
downloadsamba-509be8d902038ec2a75ece5fd28d43d73218f0b2.tar.gz
samba-509be8d902038ec2a75ece5fd28d43d73218f0b2.tar.bz2
samba-509be8d902038ec2a75ece5fd28d43d73218f0b2.zip
r11781: rename tree to tcons to match the sessions substructure of smbsrv_connection
metze (This used to be commit acd3e644e030a3544ddc6cdcd4e0ec9617732cba)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/conn.c14
-rw-r--r--source4/smb_server/management.c22
-rw-r--r--source4/smb_server/reply.c4
-rw-r--r--source4/smb_server/smb_server.h8
4 files changed, 24 insertions, 24 deletions
diff --git a/source4/smb_server/conn.c b/source4/smb_server/conn.c
index 31bdd6de98..5a5eeb3b0c 100644
--- a/source4/smb_server/conn.c
+++ b/source4/smb_server/conn.c
@@ -31,8 +31,8 @@ init the tcon structures
****************************************************************************/
NTSTATUS smbsrv_init_tcons(struct smbsrv_connection *smb_conn)
{
- smb_conn->tree.idtree_tid = idr_init(smb_conn);
- NT_STATUS_HAVE_NO_MEMORY(smb_conn->tree.idtree_tid);
+ smb_conn->tcons.idtree_tid = idr_init(smb_conn);
+ NT_STATUS_HAVE_NO_MEMORY(smb_conn->tcons.idtree_tid);
return NT_STATUS_OK;
}
@@ -41,7 +41,7 @@ find a tcon given a cnum
****************************************************************************/
struct smbsrv_tcon *smbsrv_tcon_find(struct smbsrv_connection *smb_conn, uint_t tid)
{
- return idr_find(smb_conn->tree.idtree_tid, tid);
+ return idr_find(smb_conn->tcons.idtree_tid, tid);
}
/*
@@ -59,8 +59,8 @@ static int smbsrv_tcon_destructor(void *ptr)
/* tell the ntvfs backend that we are disconnecting */
ntvfs_disconnect(tcon);
- idr_remove(tcon->smb_conn->tree.idtree_tid, tcon->tid);
- DLIST_REMOVE(tcon->smb_conn->tree.tcons, tcon);
+ idr_remove(tcon->smb_conn->tcons.idtree_tid, tcon->tid);
+ DLIST_REMOVE(tcon->smb_conn->tcons.list, tcon);
return 0;
}
@@ -75,7 +75,7 @@ struct smbsrv_tcon *smbsrv_tcon_new(struct smbsrv_connection *smb_conn)
tcon = talloc_zero(smb_conn, struct smbsrv_tcon);
if (!tcon) return NULL;
- i = idr_get_new_random(smb_conn->tree.idtree_tid, tcon, UINT16_MAX);
+ i = idr_get_new_random(smb_conn->tcons.idtree_tid, tcon, UINT16_MAX);
if (i == -1) {
DEBUG(1,("ERROR! Out of connection structures\n"));
return NULL;
@@ -87,7 +87,7 @@ struct smbsrv_tcon *smbsrv_tcon_new(struct smbsrv_connection *smb_conn)
talloc_set_destructor(tcon, smbsrv_tcon_destructor);
- DLIST_ADD(smb_conn->tree.tcons, tcon);
+ DLIST_ADD(smb_conn->tcons.list, tcon);
return tcon;
}
diff --git a/source4/smb_server/management.c b/source4/smb_server/management.c
index 234adac414..23680be112 100644
--- a/source4/smb_server/management.c
+++ b/source4/smb_server/management.c
@@ -62,30 +62,30 @@ static NTSTATUS smbsrv_session_information(struct irpc_message *msg,
/*
return a list of tree connects
*/
-static NTSTATUS smbsrv_tree_information(struct irpc_message *msg,
- struct smbsrv_information *r)
+static NTSTATUS smbsrv_tcon_information(struct irpc_message *msg,
+ struct smbsrv_information *r)
{
struct smbsrv_connection *smb_conn = talloc_get_type(msg->private, struct smbsrv_connection);
int i=0, count=0;
struct smbsrv_tcon *tcon;
/* count the number of tcons */
- for (tcon=smb_conn->tree.tcons; tcon; tcon=tcon->next) {
+ for (tcon=smb_conn->tcons.list; tcon; tcon=tcon->next) {
count++;
}
- r->out.info.trees.num_trees = count;
- r->out.info.trees.trees = talloc_array(r, struct smbsrv_tree_info, count);
- NT_STATUS_HAVE_NO_MEMORY(r->out.info.trees.trees);
+ r->out.info.tcons.num_tcons = count;
+ r->out.info.tcons.tcons = talloc_array(r, struct smbsrv_tcon_info, count);
+ NT_STATUS_HAVE_NO_MEMORY(r->out.info.tcons.tcons);
- for (tcon=smb_conn->tree.tcons; tcon; tcon=tcon->next) {
- struct smbsrv_tree_info *info = &r->out.info.trees.trees[i];
+ for (tcon=smb_conn->tcons.list; tcon; tcon=tcon->next) {
+ struct smbsrv_tcon_info *info = &r->out.info.tcons.tcons[i];
info->tid = tcon->tid;
info->share_name = lp_servicename(tcon->service);
info->connect_time = timeval_to_nttime(&tcon->connect_time);
info->client_ip = socket_get_peer_addr(smb_conn->connection->socket, r);
i++;
- }
+ }
return NT_STATUS_OK;
}
@@ -99,8 +99,8 @@ static NTSTATUS smbsrv_information(struct irpc_message *msg,
switch (r->in.level) {
case SMBSRV_INFO_SESSIONS:
return smbsrv_session_information(msg, r);
- case SMBSRV_INFO_TREES:
- return smbsrv_tree_information(msg, r);
+ case SMBSRV_INFO_TCONS:
+ return smbsrv_tcon_information(msg, r);
}
return NT_STATUS_OK;
diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c
index 4526d6f7f3..eb7b5a1082 100644
--- a/source4/smb_server/reply.c
+++ b/source4/smb_server/reply.c
@@ -1200,7 +1200,7 @@ void reply_exit(struct smbsrv_request *req)
struct smbsrv_tcon *tcon;
REQ_CHECK_WCT(req, 0);
- for (tcon=req->smb_conn->tree.tcons;tcon;tcon=tcon->next) {
+ for (tcon=req->smb_conn->tcons.list;tcon;tcon=tcon->next) {
req->tcon = tcon;
status = ntvfs_exit(req);
req->tcon = NULL;
@@ -2181,7 +2181,7 @@ void reply_ulogoffX(struct smbsrv_request *req)
/* in user level security we are supposed to close any files
open by this user on all open tree connects */
- for (tcon=req->smb_conn->tree.tcons;tcon;tcon=tcon->next) {
+ for (tcon=req->smb_conn->tcons.list;tcon;tcon=tcon->next) {
req->tcon = tcon;
status = ntvfs_logoff(req);
req->tcon = NULL;
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 4b2f65d14a..ddf4a2b627 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -222,12 +222,12 @@ struct smbsrv_connection {
/* the context associated with open tree connects on a smb socket */
struct {
- /* list of open tree connects */
- struct smbsrv_tcon *tcons;
-
/* an id tree used to allocate tids */
struct idr_context *idtree_tid;
- } tree;
+
+ /* list of open tree connects */
+ struct smbsrv_tcon *list;
+ } tcons;
/* context associated with currently valid session setups */
struct {