The branch, master has been updated
       via  2828318... s4:librpc/rpc: fix dcerpc_log_packet() prototype
       via  af89b46... s4:librpc/rpc: autodetect the need of async call logic
      from  a2e1f54... pidl:Samba3/ClientNDR: ignore "todo" functions

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 282831874379445a071dfe157ae4cfba6aeb10aa
Author: Stefan Metzmacher <me...@samba.org>
Date:   Tue Aug 10 15:11:02 2010 +0200

    s4:librpc/rpc: fix dcerpc_log_packet() prototype
    
    metze

commit af89b460f72acb843b57a80a8f61a26056dc0dd2
Author: Stefan Metzmacher <me...@samba.org>
Date:   Thu Aug 12 10:50:47 2010 +0200

    s4:librpc/rpc: autodetect the need of async call logic
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source4/librpc/rpc/dcerpc.c      |   13 ++++++-------
 source4/librpc/rpc/dcerpc.h      |    7 +++----
 source4/librpc/rpc/dcerpc_util.c |    6 +++---
 3 files changed, 12 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index a04dbb1..3d50807 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -897,7 +897,6 @@ req_done:
 static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, 
                                               const struct GUID *object,
                                               uint16_t opnum,
-                                              bool async,
                                               DATA_BLOB *stub_data)
 {
        struct rpc_request *req;
@@ -916,7 +915,6 @@ static struct rpc_request *dcerpc_request_send(struct 
dcerpc_pipe *p,
        req->payload = data_blob(NULL, 0);
        req->flags = 0;
        req->fault_code = 0;
-       req->async_call = async;
        req->ignore_timeout = false;
        req->async.callback = NULL;
        req->async.private_data = NULL;
@@ -967,6 +965,7 @@ static void dcerpc_ship_next_request(struct 
dcerpc_connection *c)
        uint32_t remaining, chunk_size;
        bool first_packet = true;
        size_t sig_size = 0;
+       bool need_async = false;
 
        req = c->request_queue;
        if (req == NULL) {
@@ -976,8 +975,8 @@ static void dcerpc_ship_next_request(struct 
dcerpc_connection *c)
        p = req->p;
        stub_data = &req->request_data;
 
-       if (!req->async_call && (c->pending != NULL)) {
-               return;
+       if (c->pending) {
+               need_async = true;
        }
 
        DLIST_REMOVE(c->request_queue, req);
@@ -1045,7 +1044,7 @@ static void dcerpc_ship_next_request(struct 
dcerpc_connection *c)
                        return;
                }
 
-               if (last_frag && !req->async_call) {
+               if (last_frag && !need_async) {
                        do_trans = true;
                }
 
@@ -1119,7 +1118,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
 {
        struct rpc_request *req;
 
-       req = dcerpc_request_send(p, object, opnum, false, stub_data_in);
+       req = dcerpc_request_send(p, object, opnum, stub_data_in);
        if (req == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -1385,7 +1384,7 @@ struct rpc_request *dcerpc_ndr_request_send(struct 
dcerpc_pipe *p,
        dump_data(10, request.data, request.length);
 
        /* make the actual dcerpc request */
-       req = dcerpc_request_send(p, object, opnum, async, &request);
+       req = dcerpc_request_send(p, object, opnum, &request);
 
        if (req != NULL) {
                req->ndr.table = table;
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index b187504..0fe227d 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -230,7 +230,6 @@ struct rpc_request {
        const struct GUID *object;
        uint16_t opnum;
        DATA_BLOB request_data;
-       bool async_call;
        bool ignore_timeout;
 
        /* use by the ndr level async recv call */
@@ -361,9 +360,9 @@ NTSTATUS dcerpc_secondary_auth_connection_recv(struct 
composite_context *c,
 struct composite_context* dcerpc_secondary_connection_send(struct dcerpc_pipe 
*p,
                                                           struct 
dcerpc_binding *b);
 void dcerpc_log_packet(const char *lockdir, 
-                                          const struct ndr_interface_table 
*ndr,
-                                          uint32_t opnum, uint32_t flags, 
-                                          DATA_BLOB *pkt);
+                      const struct ndr_interface_table *ndr,
+                      uint32_t opnum, uint32_t flags,
+                      const DATA_BLOB *pkt);
 NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
                                    const struct dcerpc_binding *binding,
                                    struct epm_tower *tower);
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 1210b58..5258bca 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -721,9 +721,9 @@ _PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct 
dcerpc_pipe *p,
   this triggers on a debug level of >= 10
 */
 _PUBLIC_ void dcerpc_log_packet(const char *lockdir,
-                                                               const struct 
ndr_interface_table *ndr,
-                      uint32_t opnum, uint32_t flags, 
-                      DATA_BLOB *pkt)
+                               const struct ndr_interface_table *ndr,
+                               uint32_t opnum, uint32_t flags,
+                               const DATA_BLOB *pkt)
 {
        const int num_examples = 20;
        int i;


-- 
Samba Shared Repository

Reply via email to