Changeset 63267 in vbox for trunk/src/VBox/NetworkServices/NetLib
- Timestamp:
- Aug 10, 2016 1:34:15 PM (8 years ago)
- Location:
- trunk/src/VBox/NetworkServices/NetLib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
r62679 r63267 533 533 534 534 /* S/G API */ 535 int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG pcSg, int cSg, size_t cbFrame) 536 { 535 int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbFrame) 536 { 537 /* Allocate frame */ 537 538 PINTNETHDR pHdr = NULL; 538 uint8_t *pu8Frame = NULL; 539 540 /* Allocate frame */ 541 int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, cbFrame, &pHdr, (void **)&pu8Frame); 539 uint8_t *pbFrame = NULL; 540 int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, (uint32_t)cbFrame, &pHdr, (void **)&pbFrame); 542 541 AssertRCReturn(rc, rc); 543 542 544 543 /* Now we fill pvFrame with S/G above */ 545 int offFrame = 0;546 for ( int idxSg = 0; idxSg < cSg; ++idxSg)547 { 548 memcpy(&p u8Frame[offFrame], pcSg[idxSg].pv, pcSg[idxSg].cb);549 offFrame +=pcSg[idxSg].cb;544 size_t offFrame = 0; 545 for (size_t idxSeg = 0; idxSeg < cSegs; ++idxSeg) 546 { 547 memcpy(&pbFrame[offFrame], paSegs[idxSeg].pv, paSegs[idxSeg].cb); 548 offFrame += paSegs[idxSeg].cb; 550 549 } 551 550 … … 817 816 void VBoxNetBaseService::debugPrintV(int iMinLevel, bool fMsg, const char *pszFmt, va_list va) const 818 817 { 818 RT_NOREF(fMsg); 819 819 if (iMinLevel <= m->m_cVerbosity) 820 820 { … … 840 840 { 841 841 PRTGETOPTDEF pOpt = m->m_vecOptionDefs[i]; 842 memcpy(&pOptArray[i], m->m_vecOptionDefs[i], sizeof(RTGETOPTDEF));842 memcpy(&pOptArray[i], pOpt, sizeof(*pOpt)); 843 843 } 844 844 return pOptArray; -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
r62481 r63267 70 70 int waitForIntNetEvent(int cMillis); 71 71 int abortWait(); 72 int sendBufferOnWire(PCINTNETSEG p Sg, int cSg, size_t cbBuffer);72 int sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbBuffer); 73 73 void flushWire(); 74 74 -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
r62481 r63267 80 80 int VBoxNetIntIfRingWriteFrame(PINTNETBUF pBuf, PINTNETRINGBUF pRingBuf, size_t cSegs, PCINTNETSEG paSegs) 81 81 { 82 RT_NOREF(pBuf); 83 82 84 /* 83 85 * Validate input. -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp
r62681 r63267 55 55 bool fEmptyAcceptable) 56 56 { 57 int idxRaw = 0;58 57 int cbField = 0; 59 58
Note:
See TracChangeset
for help on using the changeset viewer.