summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb2/tcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server/smb2/tcon.c')
-rw-r--r--source4/smb_server/smb2/tcon.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c
index d802146128..0dac29cf57 100644
--- a/source4/smb_server/smb2/tcon.c
+++ b/source4/smb_server/smb2/tcon.c
@@ -84,7 +84,7 @@ static NTSTATUS smb2srv_send_oplock_break(void *p, struct ntvfs_handle *h, uint8
return NT_STATUS_OK;
}
-struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint8_t *base, uint_t offset)
+struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint8_t *base, unsigned int offset)
{
struct smbsrv_tcon *tcon;
struct smbsrv_handle *handle;
@@ -160,7 +160,7 @@ struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint
return handle->ntvfs;
}
-void smb2srv_push_handle(uint8_t *base, uint_t offset, struct ntvfs_handle *ntvfs)
+void smb2srv_push_handle(uint8_t *base, unsigned int offset, struct ntvfs_handle *ntvfs)
{
struct smbsrv_handle *handle = talloc_get_type(ntvfs->frontend_data.private_data,
struct smbsrv_handle);
@@ -304,9 +304,11 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, union smb_tcon
goto failed;
}
- status = ntvfs_set_addr_callbacks(tcon->ntvfs, smbsrv_get_my_addr, smbsrv_get_peer_addr, req->smb_conn);
+ status = ntvfs_set_addresses(tcon->ntvfs,
+ req->smb_conn->connection->local_address,
+ req->smb_conn->connection->remote_address);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("smb2srv_tcon_backend: NTVFS failed to set the addr callbacks!\n"));
+ DEBUG(0,("smb2srv_tcon_backend: NTVFS failed to set the address!\n"));
goto failed;
}
@@ -343,7 +345,7 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, union smb_tcon
/* Invoke NTVFS connection hook */
status = ntvfs_connect(req->ntvfs, io);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("smb2srv_tcon_backend: NTVFS ntvfs_connect() failed!\n"));
+ DEBUG(0,("smb2srv_tcon_backend: NTVFS ntvfs_connect() failed: %s!\n", nt_errstr(status)));
goto failed;
}