Changeset 31539 in vbox for trunk/src/VBox/Main/USBControllerImpl.cpp
- Timestamp:
- Aug 10, 2010 3:40:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/USBControllerImpl.cpp
r30856 r31539 59 59 struct USBController::Data 60 60 { 61 Data() 62 : pParent(NULL) 63 {}; 61 Data(Machine *pMachine) 62 : pParent(pMachine), 63 pHost(pMachine->getVirtualBox()->host()) 64 { } 64 65 65 66 ~Data() 66 67 {}; 67 68 68 /** Parent object. */69 69 Machine * const pParent; 70 /** Peer object. */ 70 Host * const pHost; 71 72 // peer machine's USB controller 71 73 const ComObjPtr<USBController> pPeer; 72 74 … … 115 117 AssertReturn(autoInitSpan.isOk(), E_FAIL); 116 118 117 m = new Data(); 118 119 unconst(m->pParent) = aParent; 119 m = new Data(aParent); 120 120 121 /* mPeer is left null */ 121 122 … … 153 154 AssertReturn(autoInitSpan.isOk(), E_FAIL); 154 155 155 m = new Data(); 156 157 unconst(m->pParent) = aParent; 156 m = new Data(aParent); 157 158 158 unconst(m->pPeer) = aPeer; 159 159 … … 197 197 AssertReturn(autoInitSpan.isOk(), E_FAIL); 198 198 199 m = new Data(); 200 201 unconst(m->pParent) = aParent; 199 m = new Data(aParent); 200 202 201 /* mPeer is left null */ 203 202 … … 537 536 if (filter->getData().mActive && Global::IsOnline(adep.machineState())) 538 537 { 539 USBProxyService *service = m->p Parent->getVirtualBox()->host()->usbProxyService();538 USBProxyService *service = m->pHost->usbProxyService(); 540 539 ComAssertRet(service, E_FAIL); 541 540 … … 608 607 if (filter->getData().mActive && Global::IsOnline(adep.machineState())) 609 608 { 610 USBProxyService *service = m->p Parent->getVirtualBox()->host()->usbProxyService();609 USBProxyService *service = m->pHost->usbProxyService(); 611 610 ComAssertRet(service, E_FAIL); 612 611 … … 756 755 if (m->llDeviceFilters.isBackedUp()) 757 756 { 758 USBProxyService *service = m->p Parent->getVirtualBox()->host()->usbProxyService();757 USBProxyService *service = m->pHost->usbProxyService(); 759 758 Assert(service); 760 759 … … 1007 1006 /* we don't modify our data fields -- no need to lock */ 1008 1007 1009 if (aFilter->mInList && m->pParent->isRegistered()) 1010 { 1011 USBProxyService *service = m->pParent->getVirtualBox()->host()->usbProxyService(); 1008 if ( aFilter->mInList 1009 && m->pParent->isRegistered()) 1010 { 1011 USBProxyService *service = m->pHost->usbProxyService(); 1012 1012 ComAssertRet(service, E_FAIL); 1013 1013 … … 1201 1201 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1202 1202 1203 USBProxyService *service = m->p Parent->getVirtualBox()->host()->usbProxyService();1203 USBProxyService *service = m->pHost->usbProxyService(); 1204 1204 AssertReturn(service, E_FAIL); 1205 1205
Note:
See TracChangeset
for help on using the changeset viewer.