summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb/request.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-11 18:15:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:10:02 -0500
commit3b36a857980b1f9fa5a6be0253e85c975f35c13f (patch)
tree3eadbd0a44cb67b6773e0bee0e81af688c097854 /source4/smb_server/smb/request.c
parentd89b4adf7abdc74f23960dee3f4961006ac12be6 (diff)
downloadsamba-3b36a857980b1f9fa5a6be0253e85c975f35c13f.tar.gz
samba-3b36a857980b1f9fa5a6be0253e85c975f35c13f.tar.bz2
samba-3b36a857980b1f9fa5a6be0253e85c975f35c13f.zip
r16950: remove the smb mid from the ntvfs layer and keep a list of pending
requests on the smbsrv_connection, to be able to match then on ntcancel metze (This used to be commit 04f0d3d03179b6060fd013b867d13caa92ec6460)
Diffstat (limited to 'source4/smb_server/smb/request.c')
-rw-r--r--source4/smb_server/smb/request.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index a08ae46852..fc7d060ea8 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -33,6 +33,12 @@
/* we over allocate the data buffer to prevent too many realloc calls */
#define REQ_OVER_ALLOCATION 0
+static int smbsrv_request_destructor(struct smbsrv_request *req)
+{
+ DLIST_REMOVE(req->smb_conn->requests, req);
+ return 0;
+}
+
/****************************************************************************
construct a basic request packet, mostly used to construct async packets
such as change notify and oplock break requests
@@ -49,6 +55,8 @@ struct smbsrv_request *smbsrv_init_request(struct smbsrv_connection *smb_conn)
/* setup the request context */
req->smb_conn = smb_conn;
+ talloc_set_destructor(req, smbsrv_request_destructor);
+
return req;
}