Changeset 38986 in vbox
- Timestamp:
- Oct 13, 2011 2:10:30 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 74384
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/RemoteUSBBackend.cpp
r38911 r38986 1301 1301 if (fURBCompleted) 1302 1302 { 1303 /* Move the URB to head of URB list, so the iface_ReapURB could find it faster. */ 1303 /* Move the URB near the head of URB list, so that iface_ReapURB can 1304 * find it faster. Note that the order of completion must be preserved! 1305 */ 1304 1306 if (qurb->prev) 1305 1307 { 1306 /* The URB is not in the head. */1308 /* The URB is not in the head. Unlink it from its current position. */ 1307 1309 qurb->prev->next = qurb->next; 1308 1310 … … 1316 1318 } 1317 1319 1318 qurb->next = pDevice->pHeadQURBs; 1319 qurb->prev = NULL; 1320 1321 pDevice->pHeadQURBs->prev = qurb; 1322 pDevice->pHeadQURBs = qurb; 1320 /* And insert it to its new place. */ 1321 if (pDevice->pHeadQURBs->fCompleted) 1322 { 1323 /* At least one other completed URB; insert after the 1324 * last completed URB. 1325 */ 1326 REMOTEUSBQURB *prev_qurb = pDevice->pHeadQURBs; 1327 while (prev_qurb->next && prev_qurb->next->fCompleted) 1328 prev_qurb = prev_qurb->next; 1329 1330 qurb->next = prev_qurb->next; 1331 qurb->prev = prev_qurb; 1332 1333 if (prev_qurb->next) 1334 prev_qurb->next->prev = qurb; 1335 else 1336 pDevice->pTailQURBs = qurb; 1337 prev_qurb->next = qurb; 1338 } 1339 else 1340 { 1341 /* No other completed URBs; insert at head. */ 1342 qurb->next = pDevice->pHeadQURBs; 1343 qurb->prev = NULL; 1344 1345 pDevice->pHeadQURBs->prev = qurb; 1346 pDevice->pHeadQURBs = qurb; 1347 } 1323 1348 } 1324 1349
Note:
See TracChangeset
for help on using the changeset viewer.