summaryrefslogtreecommitdiff
path: root/source4/libcli/composite/sesssetup.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-16 22:22:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:54 -0500
commita38df2d251cc0e5489b7ea56401f40910798edd5 (patch)
treea3a7cf9bee854b5127e422d67c51cf51bbf00bd4 /source4/libcli/composite/sesssetup.c
parent99d30a901f04eac38922112c00a211e8fdb575a5 (diff)
downloadsamba-a38df2d251cc0e5489b7ea56401f40910798edd5.tar.gz
samba-a38df2d251cc0e5489b7ea56401f40910798edd5.tar.bz2
samba-a38df2d251cc0e5489b7ea56401f40910798edd5.zip
r4783: got rid of another void* in the composite code. This brings us down to
the minimal level I think (one private pointer for the composite function, and one private pointer for the caller) (This used to be commit 0240bf928163e32e7c69be88fe3ed4987dd18778)
Diffstat (limited to 'source4/libcli/composite/sesssetup.c')
-rw-r--r--source4/libcli/composite/sesssetup.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/source4/libcli/composite/sesssetup.c b/source4/libcli/composite/sesssetup.c
index 7053c9f9e5..fdc638837c 100644
--- a/source4/libcli/composite/sesssetup.c
+++ b/source4/libcli/composite/sesssetup.c
@@ -31,6 +31,7 @@ struct sesssetup_state {
union smb_sesssetup setup;
NTSTATUS session_key_err;
struct smb_composite_sesssetup *io;
+ struct smbcli_request *req;
};
@@ -134,10 +135,9 @@ static void request_handler(struct smbcli_request *req)
smbcli_transport_simple_set_signing(session->transport, session_key, null_data_blob);
}
- req = smb_raw_session_setup_send(session, &state->setup);
- req->async.fn = request_handler;
- req->async.private = c;
- c->req = req;
+ state->req = smb_raw_session_setup_send(session, &state->setup);
+ state->req->async.fn = request_handler;
+ state->req->async.private = c;
return;
}
@@ -338,7 +338,6 @@ struct smbcli_composite *smb_composite_sesssetup_send(struct smbcli_session *ses
{
struct smbcli_composite *c;
struct sesssetup_state *state;
- struct smbcli_request *req = NULL;
c = talloc_zero(session, struct smbcli_composite);
if (c == NULL) goto failed;
@@ -361,19 +360,18 @@ struct smbcli_composite *smb_composite_sesssetup_send(struct smbcli_session *ses
/* see what session setup interface we will use */
if (session->transport->negotiate.protocol < PROTOCOL_NT1) {
- req = session_setup_old(c, session, io);
+ state->req = session_setup_old(c, session, io);
} else if (!session->transport->options.use_spnego ||
!(io->in.capabilities & CAP_EXTENDED_SECURITY)) {
- req = session_setup_nt1(c, session, io);
+ state->req = session_setup_nt1(c, session, io);
} else {
- req = session_setup_spnego(c, session, io);
+ state->req = session_setup_spnego(c, session, io);
}
- if (req == NULL) goto failed;
+ if (state->req == NULL) goto failed;
- req->async.fn = request_handler;
- req->async.private = c;
- c->req = req;
+ state->req->async.fn = request_handler;
+ state->req->async.private = c;
return c;