diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-28 23:09:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:57 -0500 |
commit | 42c4dd18322452b6ab709eac8ba6724daf93ed36 (patch) | |
tree | dc3154bc1910df31a7f242f7698707064926ef71 /source4/smb_server | |
parent | 479bf22c813501f040adf7b6267b961748baa63f (diff) | |
download | samba-42c4dd18322452b6ab709eac8ba6724daf93ed36.tar.gz samba-42c4dd18322452b6ab709eac8ba6724daf93ed36.tar.xz samba-42c4dd18322452b6ab709eac8ba6724daf93ed36.zip |
r3341: - don't zero the async structure (makes valgrind more useful)
- get rid of req->mid, as it isn't a safe value to use to match
requests in the server (it is safe in the client code, as we choose
the mid, but in the server we can't rely on other clients to choose
the mid carefully)
(This used to be commit 938fb44351e12a515073ea94cd306988d5ca7340)
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/request.c | 4 | ||||
-rw-r--r-- | source4/smb_server/smb_server.c | 1 | ||||
-rw-r--r-- | source4/smb_server/smb_server.h | 3 |
3 files changed, 2 insertions, 6 deletions
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c index 34273a63a85..5b137b4c537 100644 --- a/source4/smb_server/request.c +++ b/source4/smb_server/request.c @@ -57,10 +57,10 @@ struct smbsrv_request *init_smb_request(struct smbsrv_connection *smb_conn) req->async_states = talloc_p(req, struct ntvfs_async_state); if (!req->async_states) { + talloc_free(req); return NULL; } - - ZERO_STRUCTP(req->async_states); + req->async_states->state = 0; return req; } diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 86a876554fe..de3d60a6bdd 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -624,7 +624,6 @@ static void construct_reply(struct smbsrv_request *req) req->flags = CVAL(req->in.hdr, HDR_FLG); req->flags2 = SVAL(req->in.hdr, HDR_FLG2); req->smbpid = SVAL(req->in.hdr,HDR_PID); - req->mid = SVAL(req->in.hdr,HDR_MID); if (!req_signing_check_incoming(req)) { req_reply_error(req, NT_STATUS_ACCESS_DENIED); diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h index 065c01d6f52..53ef5cd575b 100644 --- a/source4/smb_server/smb_server.h +++ b/source4/smb_server/smb_server.h @@ -89,9 +89,6 @@ struct smbsrv_request { /* the session context is derived from the vuid */ struct smbsrv_session *session; - /* the mid of this packet - used to match replies */ - uint16_t mid; - /* a set of flags to control usage of the request. See REQ_CONTROL_* */ unsigned control_flags; |