nfs4: Several minor fixes

This commit is contained in:
Pawel Dziepak
2012-08-05 03:10:38 +02:00
parent 94c47dc6a8
commit 8019eaf184
3 changed files with 8 additions and 7 deletions
@@ -593,7 +593,7 @@ ConnectionListener::Listen(ConnectionListener** _listener, uint16 port)
status_t
ConnectionListener::AcceptConnection(Connection** _connection)
ConnectionListener::AcceptConnection(Connection** connection)
{
object_wait_info object[2];
object[0].object = fWaitCancel;
@@ -623,15 +623,13 @@ ConnectionListener::AcceptConnection(Connection** _connection)
ServerAddress address;
address.fProtocol = IPPROTO_TCP;
address.fAddress = addr;
Connection* connection;
status_t result = Connection::SetTo(&connection, sock, address);
status_t result = Connection::SetTo(connection, sock, address);
if (result != B_OK) {
close(sock);
return result;
}
*_connection = connection;
return B_OK;
}
@@ -26,7 +26,7 @@ enum {
PROGRAM_NFS_CB = 0x40000000
};
#define NFS_VERSION 4
#define NFS_CB_VERSION 1
CallbackRequest::CallbackRequest(void *buffer, int size)
@@ -46,6 +46,9 @@ CallbackRequest::CallbackRequest(void *buffer, int size)
if (fStream.GetUInt() != PROGRAM_NFS_CB)
return;
if (fStream.GetUInt() != NFS_CB_VERSION)
return;
fProcedure = fStream.GetUInt();
fStream.GetOpaque(NULL);
@@ -170,7 +170,7 @@ CallbackServer::NewConnection(Connection* connection)
return B_NO_MEMORY;
arguments[0] = this;
arguments[1] = connection;
arguments[1] = entry;
thread_id thread;
thread = spawn_kernel_thread(&CallbackServer::ConnectionThreadLauncher,
@@ -224,7 +224,7 @@ status_t
CallbackServer::ConnectionThread(ConnectionEntry* entry)
{
Connection* connection = entry->fConnection;
dprintf("NEW CONNECTION\n");
while (fThreadRunning) {
uint32 size;
void* buffer;