- Timestamp:
- Mar 22, 2007 6:58:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp
r1534 r1647 117 117 RTFILE tmp = pData->NamedPipe; 118 118 pData->NamedPipe = NIL_RTFILE; 119 #if 0 119 120 FlushFileBuffers((HANDLE)tmp); 121 #endif 120 122 DisconnectNamedPipe((HANDLE)tmp); 121 123 RTFileClose(tmp); … … 168 170 { 169 171 unsigned cbWritten; 172 #if 0 170 173 rc = RTFileWrite(pData->NamedPipe, pvBuf, *cbWrite, &cbWritten); 174 #else 175 cbWritten = *cbWrite; 176 #endif 171 177 if (VBOX_FAILURE(rc)) 172 178 { … … 175 181 RTFILE tmp = pData->NamedPipe; 176 182 pData->NamedPipe = NIL_RTFILE; 183 #if 0 177 184 FlushFileBuffers((HANDLE)tmp); 185 #endif 178 186 DisconnectNamedPipe((HANDLE)tmp); 179 187 RTFileClose(tmp); … … 369 377 { 370 378 /* Connect to the named pipe. */ 371 rc = RTFileOpen(&pData->NamedPipe, p Data->pszLocation, RTFILE_O_READWRITE);379 rc = RTFileOpen(&pData->NamedPipe, pszLocation, RTFILE_O_READWRITE); 372 380 if (VBOX_FAILURE(rc)) 373 381 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("NamedPipe#%d failed to connect to named pipe %s"), pDrvIns->iInstance, pszLocation); … … 387 395 { 388 396 /* Bind address to the local socket. */ 389 RTFileDelete(p Data->pszLocation);397 RTFileDelete(pszLocation); 390 398 if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) 391 399 return PDMDrvHlpVMSetError(pDrvIns, RTErrConvertFromErrno(errno), RT_SRC_POS, N_("NamedPipe#%d failed to bind to local socket %s"), pDrvIns->iInstance, pszLocation); … … 435 443 if (pData->NamedPipe != NIL_RTFILE) 436 444 { 445 #if 0 437 446 FlushFileBuffers((HANDLE)pData->NamedPipe); 438 447 DisconnectNamedPipe((HANDLE)pData->NamedPipe); 448 #endif 439 449 RTFileClose(pData->NamedPipe); 440 450 }
Note:
See TracChangeset
for help on using the changeset viewer.