- Timestamp:
- Jul 4, 2014 4:12:56 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/sbuf.c
r44528 r51864 112 112 int ret = 0; 113 113 int mlen = 0; 114 caddr_t buf = NULL;115 114 116 115 STAM_PROFILE_START(&pData->StatIOSBAppend_pf, a); … … 141 140 /* 142 141 * We only write if there's nothing in the buffer, 143 * ottherwise it'll arrive out of order, and hence corrupt 144 */ 145 if (m->m_next) 146 { 147 buf = RTMemAlloc(mlen); 148 if (buf == NULL) 142 * otherwise it'll arrive out of order, and hence corrupt 143 */ 144 if (so->so_rcv.sb_cc == 0) 145 { 146 caddr_t buf = NULL; 147 148 if (m->m_next) 149 149 { 150 ret = 0; 151 goto no_sent; 150 buf = RTMemAlloc(mlen); 151 if (buf == NULL) 152 { 153 ret = 0; 154 goto no_sent; 155 } 156 m_copydata(m, 0, mlen, buf); 152 157 } 153 m_copydata(m, 0, mlen, buf); 154 } 155 else 156 buf = mtod(m, char *); 157 158 if(!so->so_rcv.sb_cc) 158 else 159 buf = mtod(m, char *); 160 159 161 ret = send(so->s, buf, mlen, 0); 160 162 161 if (m->m_next) 162 RTMemFree(buf); 163 if (m->m_next) 164 RTMemFree(buf); 165 } 163 166 no_sent: 164 167
Note:
See TracChangeset
for help on using the changeset viewer.