Changeset 34042 in vbox
- Timestamp:
- Nov 12, 2010 7:03:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/socket.c
r34038 r34042 724 724 int rc = 0; 725 725 static int signalled = 0; 726 uint8_t *pu8Buffer = NULL;726 char *pchBuffer = NULL; 727 727 bool fWithTemporalBuffer = false; 728 728 … … 763 763 m->m_data += sizeof(struct udpiphdr); 764 764 765 p u8Buffer = mtod(m, uint8_t*);765 pchBuffer = mtod(m, char *); 766 766 fWithTemporalBuffer = false; 767 767 /* … … 772 772 if (n > (slirp_size(pData) - sizeof(struct udpiphdr))) 773 773 { 774 p u8Buffer = RTMemAlloc((n) * sizeof(uint8_t));775 if (!p u8Buffer)774 pchBuffer = RTMemAlloc((n) * sizeof(char)); 775 if (!pchBuffer) 776 776 { 777 777 m_freem(pData, m); … … 780 780 fWithTemporalBuffer = true; 781 781 } 782 ret = recvfrom(so->s, p u8Buffer, n, 0,782 ret = recvfrom(so->s, pchBuffer, n, 0, 783 783 (struct sockaddr *)&addr, &addrlen); 784 784 if (fWithTemporalBuffer) … … 786 786 if (ret > 0) 787 787 { 788 m_copyback(pData, m, 0, ret, p u8Buffer);788 m_copyback(pData, m, 0, ret, pchBuffer); 789 789 /* 790 790 * If we've met comporison below our size prediction was failed … … 797 797 } 798 798 /* we're freeing buffer anyway */ 799 RTMemFree(p u8Buffer);799 RTMemFree(pchBuffer); 800 800 } 801 801 else
Note:
See TracChangeset
for help on using the changeset viewer.