svn commit: samba r14172 - in branches/SAMBA_4_0/source/librpc/rpc: .

metze at samba.org metze at samba.org
Fri Mar 10 20:08:16 GMT 2006


Author: metze
Date: 2006-03-10 20:08:15 +0000 (Fri, 10 Mar 2006)
New Revision: 14172

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14172

Log:
composite_is_ok(c) destroys c, when the status isn't ok.
so we need to return directly.

metze
Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c	2006-03-10 18:32:23 UTC (rev 14171)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c	2006-03-10 20:08:15 UTC (rev 14172)
@@ -47,15 +47,10 @@
 {
 	struct composite_context *c = talloc_get_type(ctx->async.private_data,
 						      struct composite_context);
-	struct pipe_np_smb_state *s = talloc_get_type(c->private_data,
-						      struct pipe_np_smb_state);
 
 	/* receive result of named pipe open request on smb */
 	c->status = dcerpc_pipe_open_smb_recv(ctx);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to open pipe %s - %s\n", s->io.pipe_name, nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	composite_done(c);
 }
@@ -73,10 +68,7 @@
 	
 	/* receive result of smb connect request */
 	c->status = smb_composite_connect_recv(ctx, c);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to connect to %s - %s\n", s->io.binding->host, nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	/* prepare named pipe open parameters */
 	s->tree         = s->conn.out.tree;
@@ -187,15 +179,10 @@
 {
 	struct composite_context *c = talloc_get_type(ctx->async.private_data,
 						      struct composite_context);
-	struct pipe_np_smb2_state *s = talloc_get_type(c->private_data,
-						       struct pipe_np_smb2_state);
 
 	/* receive result of named pipe open request on smb2 */
 	c->status = dcerpc_pipe_open_smb2_recv(ctx);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to open pipe %s - %s\n", s->io.pipe_name, nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	composite_done(c);
 }
@@ -214,10 +201,7 @@
 
 	/* receive result of smb2 connect request */
 	c->status = smb2_connect_recv(ctx, c, &s->tree);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to connect to %s - %s\n", s->io.binding->host, nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	/* prepare named pipe open parameters */
 	s->io.pipe_name = s->io.binding->endpoint;
@@ -315,16 +299,10 @@
 {
 	struct composite_context *c = talloc_get_type(ctx->async.private_data,
 						      struct composite_context);
-	struct pipe_ip_tcp_state *s = talloc_get_type(c->private_data,
-						      struct pipe_ip_tcp_state);
 
 	/* receive result of named pipe open request on tcp/ip */
 	c->status = dcerpc_pipe_open_tcp_recv(ctx);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to connect to %s:%d - %s\n", s->host, s->port,
-			 nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	composite_done(c);
 }
@@ -403,16 +381,10 @@
 {
 	struct composite_context *c = talloc_get_type(ctx->async.private_data,
 						      struct composite_context);
-	struct pipe_unix_state *s = talloc_get_type(c->private_data,
-						    struct pipe_unix_state);
 
 	/* receive result of pipe open request on unix socket */
 	c->status = dcerpc_pipe_open_unix_stream_recv(ctx);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to open unix socket %s - %s\n",
-			 s->io.binding->endpoint, nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	composite_done(c);
 }
@@ -497,16 +469,10 @@
 {
 	struct composite_context *c = talloc_get_type(ctx->async.private_data,
 						      struct composite_context);
-	struct pipe_ncalrpc_state *s = talloc_get_type(c->private_data,
-							 struct pipe_ncalrpc_state);
 
 	/* receive result of pipe open request on ncalrpc */
 	c->status = dcerpc_pipe_connect_ncalrpc_recv(ctx);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to open ncalrpc pipe '%s' - %s\n", s->io.binding->endpoint,
-			 nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	composite_done(c);
 }
@@ -599,11 +565,7 @@
 						       struct pipe_connect_state);
 	
 	c->status = dcerpc_epm_map_binding_recv(ctx);
-	if (!composite_is_ok(c)) {
-		DEBUG(0,("Failed to map DCERPC endpoint for '%s' - %s\n", 
-			 GUID_string(c, &s->table->uuid), nt_errstr(c->status)));
-		return;
-	}
+	if (!composite_is_ok(c)) return;
 
 	DEBUG(2,("Mapped to DCERPC endpoint %s\n", s->binding->endpoint));
 	



More information about the samba-cvs mailing list