]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smb_server/smb: prepare multi fragmented nttrans requests
authorStefan Metzmacher <metze@samba.org>
Mon, 7 Jul 2008 17:37:14 +0000 (19:37 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Jul 2008 18:59:19 +0000 (20:59 +0200)
metze

source/smb_server/smb/trans2.c
source/smb_server/smb_server.h

index 6dd69de436c176c73b64a3b36a40583be980695f..0e820cfe0e99f74021135ed201a6c2aa9f1b2ee2 100644 (file)
@@ -1036,7 +1036,7 @@ static NTSTATUS trans2_backend(struct smbsrv_request *req, struct trans_op *op)
        return NT_STATUS_FOOBAR;
 }
 
-static int smbsrv_trans_partial_destructor(struct smbsrv_trans_partial *tp)
+int smbsrv_trans_partial_destructor(struct smbsrv_trans_partial *tp)
 {
        DLIST_REMOVE(tp->req->smb_conn->trans_partial, tp);
        return 0;
@@ -1063,7 +1063,7 @@ static void reply_trans_continue(struct smbsrv_request *req, uint8_t command,
        tp = talloc(req, struct smbsrv_trans_partial);
 
        tp->req = req;
-       tp->trans = trans;
+       tp->u.trans = trans;
        tp->command = command;
 
        DLIST_ADD(req->smb_conn->trans_partial, tp);
@@ -1323,7 +1323,7 @@ static void reply_transs_generic(struct smbsrv_request *req, uint8_t command)
                return;
        }
 
-       trans = tp->trans;
+       trans = tp->u.trans;
 
        param_total           = SVAL(req->in.vwv, VWV(0));
        data_total            = SVAL(req->in.vwv, VWV(1));
index ac3e0f3bd3d48da003d436768d18c487dbcd6cc4..dd4ec3281bdf4d794a5197903f7b73a5c70ffa6a 100644 (file)
@@ -355,8 +355,11 @@ struct smbsrv_connection {
        struct smbsrv_trans_partial {
                struct smbsrv_trans_partial *next, *prev;
                struct smbsrv_request *req;
-               struct smb_trans2 *trans;
                uint8_t command;
+               union {
+                       struct smb_trans2 *trans;
+                       struct smb_nttrans *nttrans;
+               } u;
        } *trans_partial;
 
        /* configuration parameters */