Changeset 54779 in vbox
- Timestamp:
- Mar 16, 2015 12:33:31 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98964
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
r54729 r54779 605 605 { 606 606 pIfLe[i].InterfaceDescriptor = USBD_ParseConfigurationDescriptorEx(pCfgDr, pCfgDr, i, 0, -1, -1, -1); 607 607 pIfLe[i].Interface = NULL; 608 608 if (!pIfLe[i].InterfaceDescriptor) 609 609 { … … 613 613 } 614 614 } 615 616 615 pIfLe[pCfgDr->bNumInterfaces].InterfaceDescriptor = NULL; 616 617 617 if (NT_SUCCESS(Status)) 618 618 { … … 635 635 for (i = 0; i < pDevExt->Rt.uNumInterfaces; i++) 636 636 { 637 uint32_t uTotalIfaceInfoLength = sizeof (struct _URB_SELECT_INTERFACE) + ((pIfLe[i].Interface->NumberOfPipes > 0) ? (pIfLe[i].Interface->NumberOfPipes - 1) : 0) * sizeof(USBD_PIPE_INFORMATION);637 size_t uTotalIfaceInfoLength = RT_OFFSETOF(struct _USBD_INTERFACE_INFORMATION, Pipes[RT_MAX(pIfLe[i].Interface->NumberOfPipes, 1)]); 638 638 pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo = (PUSBD_INTERFACE_INFORMATION)vboxUsbMemAlloc(uTotalIfaceInfoLength); 639 639 if (!pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo) … … 658 658 pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo = NULL; 659 659 } 660 661 *pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo = *pIfLe[i].Interface; 662 663 // AM try/catch for handle citrix case with wrong data from device. 664 __try 665 { 666 for (ULONG j = 0; j < pIfLe[i].Interface->NumberOfPipes; j++) 667 { 668 pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo->Pipes[j] = pIfLe[i].Interface->Pipes[j]; 669 pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].EndpointAddress = pIfLe[i].Interface->Pipes[j].EndpointAddress; 670 pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].NextScheduledFrame = 0; 671 } 672 } 673 __except (EXCEPTION_EXECUTE_HANDLER) 674 { 675 Status = GetExceptionCode(); 676 break; 677 } 660 661 RtlCopyMemory(pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo, pIfLe[i].Interface, uTotalIfaceInfoLength); 662 663 for (ULONG j = 0; j < pIfLe[i].Interface->NumberOfPipes; j++) 664 { 665 pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].EndpointAddress = pIfLe[i].Interface->Pipes[j].EndpointAddress; 666 pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].NextScheduledFrame = 0; 667 } 678 668 } 679 669
Note:
See TracChangeset
for help on using the changeset viewer.