svn commit: samba r17079 - in branches/SAMBA_4_0/source/libnet: .
mimir at samba.org
mimir at samba.org
Sun Jul 16 12:29:37 GMT 2006
Author: mimir
Date: 2006-07-16 12:29:37 +0000 (Sun, 16 Jul 2006)
New Revision: 17079
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17079
Log:
Remove an attempt to connect on ncacn_ip_tcp transport after failure
on ncacn_np, as abartlet suggested. Also, named pipe remains the default
transport for all kinds of servers to be contacted.
rafal
Modified:
branches/SAMBA_4_0/source/libnet/libnet_rpc.c
Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_rpc.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_rpc.c 2006-07-16 06:33:41 UTC (rev 17078)
+++ branches/SAMBA_4_0/source/libnet/libnet_rpc.c 2006-07-16 12:29:37 UTC (rev 17079)
@@ -32,7 +32,6 @@
struct libnet_context *ctx;
struct libnet_RpcConnect r;
const char *binding;
- enum dcerpc_transport_t trans;
};
@@ -74,14 +73,9 @@
/* prepare binding string */
switch (r->level) {
case LIBNET_RPC_CONNECT_DC:
- s->binding = talloc_asprintf(s, "ncacn_ip_tcp:%s", r->in.name);
- s->trans = NCACN_IP_TCP;
- break;
-
case LIBNET_RPC_CONNECT_PDC:
case LIBNET_RPC_CONNECT_SERVER:
s->binding = talloc_asprintf(s, "ncacn_np:%s", r->in.name);
- s->trans = NCACN_NP;
break;
case LIBNET_RPC_CONNECT_BINDING:
@@ -121,38 +115,6 @@
/* receive result of rpc pipe connection */
c->status = dcerpc_pipe_connect_recv(ctx, c, &s->r.out.dcerpc_pipe);
- if (NT_STATUS_EQUAL(c->status, NT_STATUS_IO_TIMEOUT)) {
- switch (s->r.level) {
- case LIBNET_RPC_CONNECT_DC:
- if (s->trans == NCACN_IP_TCP) {
- s->binding = talloc_asprintf(s, "ncacn_np:%s", s->r.in.name);
- s->trans = NCACN_NP;
- }
- break;
-
- case LIBNET_RPC_CONNECT_SERVER:
- if (s->trans == NCACN_NP) {
- s->binding = talloc_asprintf(s, "ncacn_ip_tcp:%s", s->r.in.name);
- s->trans = NCACN_IP_TCP;
- }
- break;
-
- default:
- if (!composite_is_ok(c)) return;
- s->r.out.error_string = NULL;
- composite_done(c);
- }
-
- /* connect to remote dcerpc pipe */
- pipe_connect_req = dcerpc_pipe_connect_send(c, &s->r.out.dcerpc_pipe,
- s->binding, s->r.in.dcerpc_iface,
- s->ctx->cred, c->event_ctx);
- if (composite_nomem(pipe_connect_req, c)) return;
-
- composite_continue(c, pipe_connect_req, continue_pipe_connect, c);
- return;
- }
-
s->r.out.error_string = NULL;
composite_done(c);
}
More information about the samba-cvs
mailing list