Author: cfinck Date: Sun Mar 13 22:10:29 2011 New Revision: 51045
URL: http://svn.reactos.org/svn/reactos?rev=51045&view=rev Log: Merge r51043 and r51044
Modified: branches/ros-branch-0_3_13/reactos/ (props changed) branches/ros-branch-0_3_13/reactos/base/applications/rapps/rapps/mirc.txt branches/ros-branch-0_3_13/reactos/dll/win32/kernel32/file/npipe.c branches/ros-branch-0_3_13/reactos/dll/win32/rpcrt4/rpc_transport.c branches/ros-branch-0_3_13/reactos/dll/win32/syssetup/install.c branches/ros-branch-0_3_13/reactos/drivers/filesystems/npfs/fsctrl.c
Propchange: branches/ros-branch-0_3_13/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Mar 13 22:10:29 2011 @@ -3,3 +3,4 @@ /branches/reactx/reactos:49994-49995 /branches/ros-amd64-bringup:36852 /branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41483-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882 +/trunk/reactos:51043-51044
Modified: branches/ros-branch-0_3_13/reactos/base/applications/rapps/rapps/mirc.txt URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_13/reactos/base/a... ============================================================================== --- branches/ros-branch-0_3_13/reactos/base/applications/rapps/rapps/mirc.txt [iso-8859-1] (original) +++ branches/ros-branch-0_3_13/reactos/base/applications/rapps/rapps/mirc.txt [iso-8859-1] Sun Mar 13 22:10:29 2011 @@ -2,7 +2,7 @@
[Section] Name = mIRC -Version = 7.17 +Version = 7.19 Licence = Shareware Description = The most popular client for the Internet Relay Chat (IRC). Size = 1.9M
Modified: branches/ros-branch-0_3_13/reactos/dll/win32/kernel32/file/npipe.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_13/reactos/dll/wi... ============================================================================== --- branches/ros-branch-0_3_13/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_13/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] Sun Mar 13 22:10:29 2011 @@ -501,19 +501,19 @@ }
/* Check what timeout we got */ - if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT) + if (nTimeOut == NMPWAIT_WAIT_FOREVER) { /* Don't use a timeout */ WaitPipe.TimeoutSpecified = FALSE; } else { - /* Check if we should wait forever */ - if (nTimeOut == NMPWAIT_WAIT_FOREVER) - { - /* Set the max */ + /* Check if default */ + if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT) + { + /* Set it to 0 */ WaitPipe.Timeout.LowPart = 0; - WaitPipe.Timeout.HighPart = 0x80000000; + WaitPipe.Timeout.HighPart = 0; } else {
Modified: branches/ros-branch-0_3_13/reactos/dll/win32/rpcrt4/rpc_transport.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_13/reactos/dll/wi... ============================================================================== --- branches/ros-branch-0_3_13/reactos/dll/win32/rpcrt4/rpc_transport.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_13/reactos/dll/win32/rpcrt4/rpc_transport.c [iso-8859-1] Sun Mar 13 22:10:29 2011 @@ -219,13 +219,20 @@ if (pipe != INVALID_HANDLE_VALUE) break; err = GetLastError(); if (err == ERROR_PIPE_BUSY) { - TRACE("connection failed, error=%x\n", err); + ERR("connection to %s failed, error=%x\n", pname, err); return RPC_S_SERVER_TOO_BUSY; } - if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) { - err = GetLastError(); - WARN("connection failed, error=%x\n", err); - return RPC_S_SERVER_UNAVAILABLE; + if (wait) ERR("Waiting for Pipe Instance\n"); + if (wait) { + if (!WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) { + err = GetLastError(); + ERR("connection to %s failed, error=%x, wait %x\n", pname, err, wait); + return RPC_S_SERVER_UNAVAILABLE; + } + else + { + ERR("Pipe Instance Ready!!!!!!!!!!!!!!!!!!\n"); + } } }
@@ -314,7 +321,7 @@ /* protseq=ncacn_np: named pipes */ pname = I_RpcAllocate(strlen(prefix) + strlen(Connection->Endpoint) + 1); strcat(strcpy(pname, prefix), Connection->Endpoint); - r = rpcrt4_conn_open_pipe(Connection, pname, FALSE); + r = rpcrt4_conn_open_pipe(Connection, pname, TRUE); I_RpcFree(pname);
return r;
Modified: branches/ros-branch-0_3_13/reactos/dll/win32/syssetup/install.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_13/reactos/dll/wi... ============================================================================== --- branches/ros-branch-0_3_13/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_13/reactos/dll/win32/syssetup/install.c [iso-8859-1] Sun Mar 13 22:10:29 2011 @@ -481,6 +481,7 @@ if (hSCManager == NULL) { DPRINT1("Unable to open the service control manager.\n"); + DPRINT1("Last Error %d\n", GetLastError()); goto cleanup; }
Modified: branches/ros-branch-0_3_13/reactos/drivers/filesystems/npfs/fsctrl.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_13/reactos/driver... ============================================================================== --- branches/ros-branch-0_3_13/reactos/drivers/filesystems/npfs/fsctrl.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_13/reactos/drivers/filesystems/npfs/fsctrl.c [iso-8859-1] Sun Mar 13 22:10:29 2011 @@ -317,9 +317,105 @@ return Status; }
- static NTSTATUS NpfsWaitPipe(PIRP Irp, + PNPFS_CCB Ccb) +{ + PLIST_ENTRY current_entry; + PNPFS_FCB Fcb; + PNPFS_CCB ServerCcb; + PFILE_PIPE_WAIT_FOR_BUFFER WaitPipe; + PLARGE_INTEGER TimeOut; + NTSTATUS Status; + PEXTENDED_IO_STACK_LOCATION IoStack; + PFILE_OBJECT FileObject; + PNPFS_VCB Vcb; + + IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp); + ASSERT(IoStack); + FileObject = IoStack->FileObject; + ASSERT(FileObject); + + DPRINT1("Waiting on Pipe %wZ\n", &FileObject->FileName); + + WaitPipe = (PFILE_PIPE_WAIT_FOR_BUFFER)Irp->AssociatedIrp.SystemBuffer; + + ASSERT(Ccb->Fcb); + ASSERT(Ccb->Fcb->Vcb); + + /* Get the VCB */ + Vcb = Ccb->Fcb->Vcb; + + /* Lock the pipe list */ + KeLockMutex(&Vcb->PipeListLock); + + /* File a pipe with the given name */ + Fcb = NpfsFindPipe(Vcb, + &FileObject->FileName); + + /* Unlock the pipe list */ + KeUnlockMutex(&Vcb->PipeListLock); + + /* Fail if not pipe was found */ + if (Fcb == NULL) + { + DPRINT1("No pipe found!\n", Fcb); + return STATUS_OBJECT_NAME_NOT_FOUND; + } + + /* search for listening server */ + current_entry = Fcb->ServerCcbListHead.Flink; + while (current_entry != &Fcb->ServerCcbListHead) + { + ServerCcb = CONTAINING_RECORD(current_entry, + NPFS_CCB, + CcbListEntry); + + if (ServerCcb->PipeState == FILE_PIPE_LISTENING_STATE) + { + /* found a listening server CCB */ + DPRINT("Listening server CCB found -- connecting\n"); + + return STATUS_SUCCESS; + } + + current_entry = current_entry->Flink; + } + + /* No listening server fcb found, so wait for one */ + + /* If a timeout specified */ + if (WaitPipe->TimeoutSpecified) + { + /* NMPWAIT_USE_DEFAULT_WAIT = 0 */ + if (WaitPipe->Timeout.QuadPart == 0) + { + TimeOut = &Fcb->TimeOut; + } + else + { + TimeOut = &WaitPipe->Timeout; + } + } + else + { + /* Wait forever */ + TimeOut = NULL; + } + + Status = KeWaitForSingleObject(&Ccb->ConnectEvent, + UserRequest, + KernelMode, + TRUE, + TimeOut); + + DPRINT("KeWaitForSingleObject() returned (Status %lx)\n", Status); + + return Status; +} + +NTSTATUS +NpfsWaitPipe2(PIRP Irp, PNPFS_CCB Ccb) { PLIST_ENTRY current_entry;