Changeset 30469 in vbox for trunk/src/VBox
- Timestamp:
- Jun 28, 2010 1:59:14 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63150
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImplTeleporter.cpp
r29965 r30469 287 287 Console::teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck /*= true*/) 288 288 { 289 size_t cchCommand = strlen(pszCommand); 290 int vrc = RTTcpWrite(pState->mhSocket, pszCommand, cchCommand); 291 if (RT_SUCCESS(vrc)) 292 vrc = RTTcpWrite(pState->mhSocket, "\n", sizeof("\n") - 1); 289 int vrc = RTTcpSgWriteL(pState->mhSocket, 2, pszCommand, strlen(pszCommand), "\n", sizeof("\n") - 1); 293 290 if (RT_SUCCESS(vrc)) 294 291 vrc = RTTcpFlush(pState->mhSocket); … … 314 311 for (;;) 315 312 { 316 /* Write block header. */317 313 TELEPORTERTCPHDR Hdr; 318 314 Hdr.u32Magic = TELEPORTERTCPHDR_MAGIC; 319 315 Hdr.cb = RT_MIN((uint32_t)cbToWrite, TELEPORTERTCPHDR_MAX_SIZE); 320 int rc = RTTcp Write(pState->mhSocket, &Hdr, sizeof(Hdr));316 int rc = RTTcpSgWriteL(pState->mhSocket, 2, &Hdr, sizeof(Hdr), pvBuf, (size_t)Hdr.cb); 321 317 if (RT_FAILURE(rc)) 322 318 { 323 LogRel(("Teleporter/TCP: Header write error: %Rrc\n", rc)); 324 return rc; 325 } 326 327 /* Write the data. */ 328 rc = RTTcpWrite(pState->mhSocket, pvBuf, Hdr.cb); 329 if (RT_FAILURE(rc)) 330 { 331 LogRel(("Teleporter/TCP: Data write error: %Rrc (cb=%#x)\n", rc, Hdr.cb)); 319 LogRel(("Teleporter/TCP: Write error: %Rrc (cb=%#x)\n", rc, Hdr.cb)); 332 320 return rc; 333 321 }
Note:
See TracChangeset
for help on using the changeset viewer.