diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-07-10 08:21:22 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-07-24 19:07:05 +0200 |
commit | 78e46d7349b5839993c001a5afc2060a48244d15 (patch) | |
tree | 1f62b0d5b53d228ea9f8853c8a553a9e63512a45 | |
parent | cd95937369b1729e2417d78f3c903bce5d32da93 (diff) | |
download | samba-78e46d7349b5839993c001a5afc2060a48244d15.tar.gz samba-78e46d7349b5839993c001a5afc2060a48244d15.tar.xz samba-78e46d7349b5839993c001a5afc2060a48244d15.zip |
s4:libcli/smb2: remove unused 'primary' argument of smb2_session_init()
This also gets rid of a talloc_reference() usage.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
-rw-r--r-- | source4/libcli/smb2/connect.c | 2 | ||||
-rw-r--r-- | source4/libcli/smb2/session.c | 8 | ||||
-rw-r--r-- | source4/torture/smb2/util.c | 2 |
3 files changed, 4 insertions, 8 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c index 18977d8523..7a69b3e7d3 100644 --- a/source4/libcli/smb2/connect.c +++ b/source4/libcli/smb2/connect.c @@ -172,7 +172,7 @@ static void smb2_connect_negprot_done(struct tevent_req *subreq) /* This is a hack... */ smb2cli_conn_set_max_credits(transport->conn, 30); - state->session = smb2_session_init(transport, state->gensec_settings, state, true); + state->session = smb2_session_init(transport, state->gensec_settings, state); if (tevent_req_nomem(state->session, req)) { return; } diff --git a/source4/libcli/smb2/session.c b/source4/libcli/smb2/session.c index dfc607e0e8..4d1402a09b 100644 --- a/source4/libcli/smb2/session.c +++ b/source4/libcli/smb2/session.c @@ -36,7 +36,7 @@ */ struct smb2_session *smb2_session_init(struct smb2_transport *transport, struct gensec_settings *settings, - TALLOC_CTX *parent_ctx, bool primary) + TALLOC_CTX *parent_ctx) { struct smb2_session *session; NTSTATUS status; @@ -45,11 +45,7 @@ struct smb2_session *smb2_session_init(struct smb2_transport *transport, if (!session) { return NULL; } - if (primary) { - session->transport = talloc_steal(session, transport); - } else { - session->transport = talloc_reference(session, transport); - } + session->transport = talloc_steal(session, transport); session->smbXcli = smbXcli_session_create(session, transport->conn); if (session->smbXcli == NULL) { diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c index 97761d71a7..4297cee60a 100644 --- a/source4/torture/smb2/util.c +++ b/source4/torture/smb2/util.c @@ -323,7 +323,7 @@ bool torture_smb2_session_setup(struct torture_context *tctx, session = smb2_session_init(transport, lpcfg_gensec_settings(tctx, tctx->lp_ctx), - mem_ctx, true); + mem_ctx); if (session == NULL) { return false; |