s4:smb_server: pass tsocket_addresses to the ntvfs layer
authorStefan Metzmacher <metze@samba.org>
Mon, 26 Apr 2010 11:34:44 +0000 (13:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 27 Apr 2010 11:01:59 +0000 (13:01 +0200)
metze

source4/smb_server/smb/service.c
source4/smb_server/smb2/tcon.c

index 805dc4d558ebbbb1034f88313a1d36e93fb75668..4d5b6ff4626372bfc27882cd5e9ef139752cd2f7 100644 (file)
@@ -70,9 +70,11 @@ static NTSTATUS make_connection_scfg(struct smbsrv_request *req,
                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,("make_connection: NTVFS failed to set the addr callbacks!\n"));
+               DEBUG(0,("make_connection: NTVFS failed to set the addresses!\n"));
                goto failed;
        }
 
index ed5a262b8102ff3c365ca3f21d9685fe8ce87463..4247ef8723af3d583c42589caf502efe05f1c47a 100644 (file)
@@ -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;
        }