s3-rpc_server: Remove client_id and server_id from pipes struct.
authorAndreas Schneider <asn@samba.org>
Thu, 16 Jun 2011 14:12:07 +0000 (16:12 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 4 Jul 2011 08:28:43 +0000 (18:28 +1000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source3/include/ntdomain.h
source3/rpc_server/rpc_ncacn_np.c
source3/rpc_server/rpc_server.c

index 814dfaf3636f3f05dc1df5d73c0f59a78850136e..46579b7250f0ec628a6ffee70ecef98092e8945c 100644 (file)
@@ -110,8 +110,6 @@ struct tsocket_address;
 struct pipes_struct {
        struct pipes_struct *next, *prev;
 
-       struct client_address *client_id;
-       struct client_address *server_id;
        const struct tsocket_address *local_address;
        const struct tsocket_address *remote_address;
 
index 9bbc5dfddb74b74734b580ad69f36fde4d01c66f..b2a22295a6d4878378e583abc063f58f931a8373 100644 (file)
@@ -170,23 +170,6 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
                return false;
        }
 
-       p->client_id = talloc_zero(p, struct client_address);
-       if (p->client_id == NULL) {
-               return false;
-       }
-
-       if (tsocket_address_is_inet(p->remote_address, "ip")) {
-               p->client_id->name = tsocket_address_inet_addr_string(p->remote_address,
-                                                                     p->client_id);
-       } else {
-               p->client_id->name = talloc_strdup(p->client_id, "");
-       }
-       if (p->client_id->name == NULL) {
-               return false;
-       }
-       strlcpy(p->client_id->addr,
-               p->client_id->name, sizeof(p->client_id->addr));
-
        p->endian = RPC_LITTLE_ENDIAN;
 
        p->transport = NCALRPC;
index 6852f2e66210bc8f6e40b2a9959c21daa01bb1d7..a54ade48758b29f324c95a937ea5abd38ea18d7d 100644 (file)
@@ -174,27 +174,6 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
                return -1;
        }
 
-       p->client_id = talloc_zero(p, struct client_address);
-       if (p->client_id == NULL) {
-               TALLOC_FREE(p);
-               *perrno = ENOMEM;
-               return -1;
-       }
-
-       if (tsocket_address_is_inet(p->remote_address, "ip")) {
-               p->client_id->name = tsocket_address_inet_addr_string(p->remote_address,
-                                                                     p->client_id);
-       } else {
-               p->client_id->name = talloc_strdup(p->client_id, "");
-       }
-       if (p->client_id->name == NULL) {
-               TALLOC_FREE(p);
-               *perrno = ENOMEM;
-               return -1;
-       }
-       strlcpy(p->client_id->addr,
-               p->client_id->name, sizeof(p->client_id->addr));
-
        if (local_address != NULL) {
                p->local_address = tsocket_address_copy(local_address, p);
                if (p->local_address == NULL) {
@@ -202,28 +181,6 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
                        *perrno = ENOMEM;
                        return -1;
                }
-
-               p->server_id = talloc_zero(p, struct client_address);
-               if (p->server_id == NULL) {
-                       TALLOC_FREE(p);
-                       *perrno = ENOMEM;
-                       return -1;
-               }
-               if (tsocket_address_is_inet(p->local_address, "ip")) {
-                       p->server_id->name = tsocket_address_inet_addr_string(p->local_address,
-                                                                             p->server_id);
-               } else {
-                       p->server_id->name = talloc_strdup(p->server_id, "");
-               }
-               if (p->server_id->name == NULL) {
-                       TALLOC_FREE(p);
-                       *perrno = ENOMEM;
-                       return -1;
-               }
-
-               strlcpy(p->server_id->addr,
-                       p->server_id->name,
-                       sizeof(p->server_id->addr));
        }
 
        talloc_set_destructor(p, close_internal_rpc_pipe_hnd);