r3341: - don't zero the async structure (makes valgrind more useful)
authorAndrew Tridgell <tridge@samba.org>
Thu, 28 Oct 2004 23:09:40 +0000 (23:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:04:57 +0000 (13:04 -0500)
- 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)

source4/smb_server/request.c
source4/smb_server/smb_server.c
source4/smb_server/smb_server.h

index 34273a63a85cd522a4a09183bfac6540ca152bd1..5b137b4c537df994e5379a62a5a05521d8f062a7 100644 (file)
@@ -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;
 }
index 86a876554fe685ccf6803ced39339a44ce678045..de3d60a6bdd44b86e50490799eb0bc787205424a 100644 (file)
@@ -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);
index 065c01d6f522c1cffcf56595a37b8c6ec3a82667..53ef5cd575baef84920d30748fcb8180a59435b4 100644 (file)
@@ -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;