s3-rpc_client: add enum dcerpc_transport_t to rpc_cli_transport struct.
authorGünther Deschner <gd@samba.org>
Thu, 10 Sep 2009 17:59:37 +0000 (19:59 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Oct 2009 07:39:29 +0000 (09:39 +0200)
Guenther
(cherry picked from commit 393a1f594d5f03a51448cdc465f92c599a93904c)

source3/include/client.h
source3/rpc_client/cli_pipe.c

index 320a90e66bf2c44861e095cdb4e17f7ba6d642fe..19142109fd098320427a122a3f23e38b419a1d0c 100644 (file)
@@ -68,6 +68,8 @@ struct cli_pipe_auth_data {
 
 struct rpc_cli_transport {
 
+       enum dcerpc_transport_t transport;
+
        /**
         * Trigger an async read from the server. May return a short read.
         */
index 9aba938ffe09ab0b276ee0f77033c4ddf6c4b529..12d2b9e5432db685e2d968b00d28845b2a185e01 100644 (file)
@@ -3233,6 +3233,8 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
                goto fail;
        }
 
+       result->transport->transport = NCACN_IP_TCP;
+
        *presult = result;
        return NT_STATUS_OK;
 
@@ -3451,6 +3453,8 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
                goto fail;
        }
 
+       result->transport->transport = NCALRPC;
+
        *presult = result;
        return NT_STATUS_OK;
 
@@ -3523,6 +3527,8 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli,
                return status;
        }
 
+       result->transport->transport = NCACN_NP;
+
        DLIST_ADD(cli->pipe_list, result);
        talloc_set_destructor(result, rpc_pipe_client_np_destructor);
 
@@ -3581,6 +3587,8 @@ NTSTATUS rpc_pipe_open_local(TALLOC_CTX *mem_ctx,
                return status;
        }
 
+       result->transport->transport = NCACN_INTERNAL;
+
        *presult = result;
        return NT_STATUS_OK;
 }