diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-02-12 12:24:29 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-02-13 11:54:18 +0100 |
commit | 4d4e4ef619682801746def5b6ebd4deea8bd7368 (patch) | |
tree | e68aa976046df6c98f2633cc1539d6fd3fca876e /source4/librpc/rpc/dcerpc_smb.c | |
parent | 0cc3e945b5e2ba4f9db52488bbe86ea05f774514 (diff) | |
download | samba-4d4e4ef619682801746def5b6ebd4deea8bd7368.tar.gz |
s4:librpc/rpc: make dcerpc_pipe->binding const
This should not be changed after the connection is
ready for requests.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/librpc/rpc/dcerpc_smb.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 0224fdfb194..9b40ecac30a 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -203,6 +203,7 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p, /* if we don't have a binding on this pipe yet, then create one */ if (p->binding == NULL) { + struct dcerpc_binding *b; NTSTATUS status; const char *r = smbXcli_conn_remote_name(conn); char *str; @@ -211,12 +212,12 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p, if (str == NULL) { return NT_STATUS_NO_MEMORY; } - status = dcerpc_parse_binding(p, str, - &p->binding); + status = dcerpc_parse_binding(p, str, &b); talloc_free(str); if (!NT_STATUS_IS_OK(status)) { return status; } + p->binding = b; } ctx = dcerpc_pipe_open_smb_send(p->conn, @@ -247,6 +248,7 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p, /* if we don't have a binding on this pipe yet, then create one */ if (p->binding == NULL) { + struct dcerpc_binding *b; NTSTATUS status; const char *r = smbXcli_conn_remote_name(conn); char *str; @@ -255,12 +257,12 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p, if (str == NULL) { return NT_STATUS_NO_MEMORY; } - status = dcerpc_parse_binding(p, str, - &p->binding); + status = dcerpc_parse_binding(p, str, &b); talloc_free(str); if (!NT_STATUS_IS_OK(status)) { return status; } + p->binding = b; } ctx = dcerpc_pipe_open_smb_send(p->conn, |