Author: metze Date: 2006-07-30 17:34:37 +0000 (Sun, 30 Jul 2006) New Revision: 17320
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17320 Log: - print the debug message before the composite context get received by the caller - steal pipe2 to the state structure so we don't need to take about freeing is later metze Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c =================================================================== --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c 2006-07-30 17:31:12 UTC (rev 17319) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c 2006-07-30 17:34:37 UTC (rev 17320) @@ -67,9 +67,10 @@ /* receive endpoint mapping */ c->status = dcerpc_epm_map_binding_recv(ctx); - if (!composite_is_ok(c)) { + if (!NT_STATUS_IS_OK(c->status)) { DEBUG(0,("Failed to map DCERPC/TCP NCACN_NP pipe for '%s' - %s\n", DCERPC_NETLOGON_UUID, nt_errstr(c->status))); + composite_error(c, c->status); return; } @@ -99,6 +100,8 @@ c->status = dcerpc_secondary_connection_recv(ctx, &s->pipe2); if (!composite_is_ok(c)) return; + talloc_steal(s, s->pipe2); + /* initiate a non-authenticated bind */ auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe2, &dcerpc_table_netlogon); if (composite_nomem(auth_none_req, c)) return; @@ -122,10 +125,7 @@ /* receive result of non-authenticated bind request */ c->status = dcerpc_bind_auth_none_recv(ctx); - if (!composite_is_ok(c)) { - talloc_free(s->pipe2); - return; - } + if (!composite_is_ok(c)) return; /* prepare a challenge request */ s->r.in.server_name = talloc_asprintf(c, "\\\\%s", dcerpc_server_name(s->pipe)); @@ -214,8 +214,7 @@ /* setup current netlogon credentials */ cli_credentials_set_netlogon_creds(s->credentials, s->creds); - talloc_free(s->pipe2); - + composite_done(c); }
