Changeset 48955 in vbox
- Timestamp:
- Oct 7, 2013 9:59:25 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 89652
- Location:
- trunk/src/VBox/Main
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r47716 r48955 235 235 struct XMLStack; 236 236 237 void buildXML(AutoWriteLockBase& writeLock, 238 xml::Document &doc, 239 XMLStack &stack, 240 const Utf8Str &strPath, 237 void buildXML(AutoWriteLockBase& writeLock, 238 xml::Document &doc, 239 XMLStack &stack, 240 const Utf8Str &strPath, 241 241 ovf::OVFVersion_T enFormat); 242 242 void buildXMLForOneVirtualSystem(AutoWriteLockBase& writeLock, -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r47963 r48955 77 77 bool fManifest; // Create a manifest file on export 78 78 bool fSha256; // true = SHA256 (OVF 2.0), false = SHA1 (OVF 1.0) 79 Utf8Str strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import) 79 Utf8Str strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import) 80 80 81 81 RTCList<ImportOptions_T> optList; -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r47018 r48955 48 48 * for server configuration needs, it's perhaps better to use (VM,slot) pair 49 49 * (vm-name, slot) <----> (MAC) 50 * 50 * 51 51 * but for client configuration, when server will have MACs at hand, it'd be 52 52 * easier to requiest options by MAC. 53 53 * (MAC) <----> (option-list) 54 54 * 55 * Doubts: What should be done if MAC changed for (vm-name, slot), when syncing should? 56 * XML: serialization of dependecy (DHCP options) - (VM,slot) shouldn't be done via MAC in 55 * Doubts: What should be done if MAC changed for (vm-name, slot), when syncing should? 56 * XML: serialization of dependecy (DHCP options) - (VM,slot) shouldn't be done via MAC in 57 57 * the middle. 58 58 */ … … 114 114 STDMETHOD(GetMacOptions)(IN_BSTR aMAC, ComSafeArrayOut(BSTR, aValues)); 115 115 STDMETHOD(COMGETTER(EventSource))(IEventSource **aEventSource); 116 116 117 117 STDMETHOD(SetConfiguration)(IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress); 118 118 -
trunk/src/VBox/Main/include/DisplayImpl.h
r47774 r48955 57 57 58 58 uint16_t flags; 59 59 60 60 /* for saving the rectangles arrived during fb resize is in progress. */ 61 61 PRTRECT mpSavedVisibleRegion; … … 299 299 int vbvaLock(void); 300 300 void vbvaUnlock(void); 301 301 302 302 RTCRITSECT mSaveSeamlessRectLock; 303 303 int SaveSeamlessRectLock(void); 304 304 void SaveSeamlessRectUnLock(void); 305 305 306 306 public: 307 307 static int displayTakeScreenshotEMT(Display *pDisplay, ULONG aScreenId, uint8_t **ppu8Data, size_t *pcbData, uint32_t *pu32Width, uint32_t *pu32Height); -
trunk/src/VBox/Main/include/EmulatedUSBImpl.h
r48631 r48955 65 65 { 66 66 Data() 67 68 67 { 68 } 69 69 70 70 ComObjPtr<Console> pConsole; -
trunk/src/VBox/Main/include/HostVideoInputDeviceImpl.h
r48607 r48955 56 56 { 57 57 Data() 58 59 58 { 59 } 60 60 61 61 com::Utf8Str name; -
trunk/src/VBox/Main/include/Performance.h
r48013 r48955 174 174 } VMSTATMASK; 175 175 176 const ULONG VMSTATS_GUEST_CPULOAD = 176 const ULONG VMSTATS_GUEST_CPULOAD = 177 177 VMSTATMASK_GUEST_CPUUSER | VMSTATMASK_GUEST_CPUKERNEL | 178 178 VMSTATMASK_GUEST_CPUIDLE; -
trunk/src/VBox/Main/include/TokenImpl.h
r48431 r48955 52 52 { 53 53 Data() 54 55 54 { 55 } 56 56 57 57 ComObjPtr<SessionMachine> pSessionMachine; -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r48804 r48955 227 227 IN_BSTR aGuestIp, LONG aGuestPort); 228 228 void onHostNameResolutionConfigurationChange(); 229 229 230 230 int natNetworkRefInc(IN_BSTR aNetworkName); 231 231 int natNetworkRefDec(IN_BSTR aNetworkName); -
trunk/src/VBox/Main/include/ovfreader.h
r46518 r48955 200 200 struct EnvelopeData 201 201 { 202 OVFVersion_T version;//OVF standard version, it is used internally only by VirtualBox 202 OVFVersion_T version;//OVF standard version, it is used internally only by VirtualBox 203 203 RTCString lang;//language 204 204 … … 378 378 protected: 379 379 virtual void _checkConsistencyAndCompliance() throw (OVFLogicError); 380 virtual const RTCString& getItemName() 380 virtual const RTCString& getItemName() 381 381 { 382 382 return _getItemName(); … … 387 387 bool fDefault;//true means that some fields were absent in the XML and some default values were assigned to. 388 388 389 virtual const RTCString& _getItemName() 389 virtual const RTCString& _getItemName() 390 390 { 391 391 return itemName; … … 432 432 RTCString itemName; 433 433 434 virtual const RTCString& _getItemName() 434 virtual const RTCString& _getItemName() 435 435 { 436 436 return itemName; … … 478 478 RTCString itemName; 479 479 480 virtual const RTCString& _getItemName() 480 virtual const RTCString& _getItemName() 481 481 { 482 482 return itemName; … … 640 640 641 641 // Data fields 642 EnvelopeData m_envelopeData; //data of root element "Envelope" 642 EnvelopeData m_envelopeData; //data of root element "Envelope" 643 643 RTCString m_strPath; // file name given to constructor 644 644 DiskImagesMap m_mapDisks; // map of DiskImage structs, sorted by DiskImage.strDiskId -
trunk/src/VBox/Main/src-client/RemoteUSBBackend.cpp
r47117 r48955 1321 1321 if (pDevice->pHeadQURBs->fCompleted) 1322 1322 { 1323 /* At least one other completed URB; insert after the 1323 /* At least one other completed URB; insert after the 1324 1324 * last completed URB. 1325 1325 */ … … 1342 1342 qurb->next = pDevice->pHeadQURBs; 1343 1343 qurb->prev = NULL; 1344 1344 1345 1345 pDevice->pHeadQURBs->prev = qurb; 1346 1346 pDevice->pHeadQURBs = qurb; -
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r48425 r48955 1961 1961 VDINTERFACETYPE_IO, tar, sizeof(VDINTERFACEIO), 1962 1962 &storage.pVDImageIfaces); 1963 1963 1964 1964 if (RT_FAILURE(vrc)) 1965 1965 { … … 2113 2113 if (FAILED(rc)) throw rc; 2114 2114 2115 rc = pSourceDisk->exportFile(strTargetFilePath.c_str(), 2116 format, 2115 rc = pSourceDisk->exportFile(strTargetFilePath.c_str(), 2116 format, 2117 2117 MediumVariant_VmdkStreamOptimized, 2118 2118 pIfIo, … … 2135 2135 2136 2136 vrc = pIfIo->pfnOpen(pvUser, strTargetFilePath.c_str(), 2137 RTFILE_O_OPEN_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE, 2137 RTFILE_O_OPEN_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE, 2138 2138 0, 2139 2139 &pvStorage); -
trunk/src/VBox/Main/src-server/ApplianceImplIO.cpp
r47963 r48955 1423 1423 1424 1424 int copyFileAndCalcShaDigest(const char *pcszSourceFilename, const char *pcszTargetFilename, PVDINTERFACEIO pIfIo, void *pvUser) 1425 { 1426 /* Validate input. */ 1427 AssertPtrReturn(pIfIo, VERR_INVALID_POINTER); 1428 1425 { 1426 /* Validate input. */ 1427 AssertPtrReturn(pIfIo, VERR_INVALID_POINTER); 1428 1429 1429 PSHASTORAGE pShaStorage = (PSHASTORAGE)pvUser; 1430 1430 void *pvStorage; 1431 1431 1432 int rc = pIfIo->pfnOpen(pvUser, pcszSourceFilename, 1433 RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_NONE, 0, 1434 &pvStorage); 1435 if (RT_FAILURE(rc)) 1436 return rc; 1432 int rc = pIfIo->pfnOpen(pvUser, pcszSourceFilename, 1433 RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_NONE, 0, 1434 &pvStorage); 1435 if (RT_FAILURE(rc)) 1436 return rc; 1437 1437 1438 1438 /* Turn the source file handle/whatever into a VFS stream. */ … … 1488 1488 1489 1489 pIfIo->pfnClose(pvUser, pvStorage); 1490 return rc; 1491 } 1490 return rc; 1491 } -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r48538 r48955 3842 3842 } 3843 3843 3844 -
trunk/src/VBox/Main/src-server/HostDnsService.cpp
r48805 r48955 29 29 HostDnsService::HostDnsService(){} 30 30 31 HostDnsService::~HostDnsService () 31 HostDnsService::~HostDnsService () 32 32 { 33 33 int rc = RTCritSectDelete(&m_hCritSect); … … 36 36 37 37 38 HRESULT HostDnsService::init(const VirtualBox *aParent) 38 HRESULT HostDnsService::init(const VirtualBox *aParent) 39 39 { 40 40 mParent = aParent; 41 41 42 42 int rc = RTCritSectInit(&m_hCritSect); 43 43 AssertRCReturn(rc, E_FAIL); … … 109 109 } 110 110 111 -
trunk/src/VBox/Main/src-server/HostDnsService.h
r48806 r48955 32 32 class HostDnsService 33 33 { 34 public: 34 public: 35 35 HostDnsService(); 36 36 virtual ~HostDnsService(); -
trunk/src/VBox/Main/src-server/HostDnsServiceResolvConf.cpp
r48805 r48955 32 32 33 33 while ( RT_SUCCESS(rc = RTFileRead(File, &bTest, 1, &cbRead)) 34 && (pu8Buf - (char *)pvBuf) >= 0 34 && (pu8Buf - (char *)pvBuf) >= 0 35 35 && (size_t)(pu8Buf - (char *)pvBuf) < cbBufSize) 36 36 { … … 67 67 HRESULT hrc; 68 68 69 int rc = RTFileOpen(&m_ResolvConfFile, m_ResolvConfFilename.c_str(), 69 int rc = RTFileOpen(&m_ResolvConfFile, m_ResolvConfFilename.c_str(), 70 70 RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE); 71 71 AssertRCReturn(rc, E_FAIL); … … 110 110 continue; 111 111 112 112 m_llNameServers.push_back(com::Utf8Str(buff2)); 113 113 114 114 cNameserversFound++; … … 120 120 121 121 tok = strtok_r(&buff[6], " \t\n", &saveptr); 122 123 124 122 123 if (tok != NULL) 124 m_DomainName = com::Utf8Str(tok); 125 125 } 126 126 } -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r48805 r48955 840 840 841 841 /** 842 * This method return the list of registered name servers 842 * This method return the list of registered name servers 843 843 */ 844 844 STDMETHODIMP Host::COMGETTER(NameServers)(ComSafeArrayOut(BSTR, aNameServers)) … … 860 860 STDMETHODIMP Host::COMGETTER(DomainName)(BSTR *aDomainName) 861 861 { 862 /* XXX: note here should be synchronization with thread polling state 862 /* XXX: note here should be synchronization with thread polling state 863 863 * changes in name resoving system on host */ 864 864 865 865 AutoCaller autoCaller(this); 866 866 if (FAILED(autoCaller.rc())) return autoCaller.rc(); -
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r47919 r48955 1147 1147 { 1148 1148 strSrcTest = strSrcTest.substr(1, strSrcTest.length() - 2); 1149 1149 1150 1150 Guid temp_guid(strSrcTest); 1151 1151 if (temp_guid.isValid() && !temp_guid.isZero()) -
trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp
r48522 r48955 238 238 239 239 data.u32HostLoopback6Offset = m->u32LoopbackIp6; 240 240 241 241 data.llHostLoopbackOffsetList.clear(); 242 242 data.llHostLoopbackOffsetList.assign(m->llNATLoopbackOffsetList.begin(), … … 543 543 544 544 int rc = RTNetStrToIPv4Addr(Utf8Str(aHostId).c_str(), &addr); 545 if (RT_FAILURE(rc)) 545 if (RT_FAILURE(rc)) 546 546 return E_INVALIDARG; 547 547 548 548 /* check against 127/8 */ 549 549 if ((RT_N2H_U32(addr.u) >> IN_CLASSA_NSHIFT) != IN_LOOPBACKNET) 550 550 return E_INVALIDARG; 551 551 552 552 /* check against networkid vs network mask */ 553 553 rc = RTCidrStrToIPv4(Utf8Str(m->IPv4NetworkCidr).c_str(), &net, &mask); 554 if (RT_FAILURE(rc)) 554 if (RT_FAILURE(rc)) 555 555 return E_INVALIDARG; 556 556 … … 561 561 562 562 it = std::find(m->llNATLoopbackOffsetList.begin(), 563 m->llNATLoopbackOffsetList.end(), 563 m->llNATLoopbackOffsetList.end(), 564 564 Utf8Str(aHostId).c_str()); 565 565 … … 572 572 settings::NATLoopbackOffsetList::iterator it1; 573 573 it1 = std::find(m->llNATLoopbackOffsetList.begin(), 574 m->llNATLoopbackOffsetList.end(), 574 m->llNATLoopbackOffsetList.end(), 575 575 (uint32_t)aOffset); 576 576 if (it1 != m->llNATLoopbackOffsetList.end()) … … 586 586 /* injection */ 587 587 it = std::find(m->llNATLoopbackOffsetList.begin(), 588 m->llNATLoopbackOffsetList.end(), 588 m->llNATLoopbackOffsetList.end(), 589 589 (uint32_t)aOffset); 590 590 … … 620 620 621 621 m->u32LoopbackIp6 = aLoopbackIp6; 622 622 623 623 AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS); 624 624 return mVirtualBox->saveSettings(); … … 640 640 641 641 STDMETHODIMP NATNetwork::COMGETTER(PortForwardRules6)(ComSafeArrayOut(BSTR, 642 642 aPortForwardRules6)) 643 643 { 644 644 CheckComArgOutSafeArrayPointerValid(aPortForwardRules6); … … 931 931 932 932 } 933 933 934 934 if (skip) 935 935 continue; … … 954 954 break; 955 955 } 956 956 957 957 if (poff) 958 958 *poff = off; 959 959 960 960 return VINF_SUCCESS; 961 961 } -
trunk/src/VBox/Main/src-server/NATNetworkServiceRunner.cpp
r47894 r48955 114 114 int rc = RTEnvCreate(&env); 115 115 AssertRCReturn(rc,rc); 116 116 117 117 RTEnvPutEx(env, "VBOX_LOG=e.l.f"); 118 118 -
trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
r48710 r48955 746 746 747 747 mData.backup(); 748 748 749 749 alock.release(); 750 750 … … 1610 1610 return E_INVALIDARG; /* no such network */ 1611 1611 } 1612 1612 1613 1613 return S_OK; 1614 1614 } -
trunk/src/VBox/Main/src-server/Performance.cpp
r48013 r48955 529 529 if (aRequest->getGuest() && aRequest->getGuest() == mGuestBeingCalled) 530 530 { 531 /* 531 /* 532 532 * Before we can declare a guest blocked we need to wait for a while 533 533 * and then check again as it may never had a chance to process -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r48817 r48955 3118 3118 3119 3119 sNatNetworkNameToRefCount[name]++; 3120 3120 3121 3121 return sNatNetworkNameToRefCount[name]; 3122 3122 } … … 5199 5199 AssertComRCReturnRC(rc); 5200 5200 5201 /* returned value isn't 0 and aSaveSettings is true 5201 /* returned value isn't 0 and aSaveSettings is true 5202 5202 * means that we create duplicate, otherwise we just load settings. 5203 5203 */ 5204 if ( sNatNetworkNameToRefCount[name] 5205 && aSaveSettings) 5204 if ( sNatNetworkNameToRefCount[name] 5205 && aSaveSettings) 5206 5206 AssertComRCReturnRC(E_INVALIDARG); 5207 5207 … … 5254 5254 AutoCaller natNetworkCaller(aNATNetwork); 5255 5255 AssertComRCReturn(natNetworkCaller.rc(), natNetworkCaller.rc()); 5256 5256 5257 5257 Bstr name; 5258 5258 HRESULT rc = aNATNetwork->COMGETTER(NetworkName)(name.asOutParam()); 5259 5259 /* Hm, there're still running clients. */ 5260 if (FAILED(rc) || sNatNetworkNameToRefCount[name]) 5260 if (FAILED(rc) || sNatNetworkNameToRefCount[name]) 5261 5261 AssertComRCReturnRC(E_INVALIDARG); 5262 5262 -
trunk/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
r48805 r48955 47 47 CFRetain(g_RunLoopRef); 48 48 49 CFArrayRef watchingArrayRef = CFArrayCreate(NULL, 50 (const void **)&kStateNetworkGlobalDNSKey, 49 CFArrayRef watchingArrayRef = CFArrayCreate(NULL, 50 (const void **)&kStateNetworkGlobalDNSKey, 51 51 1, &kCFTypeArrayCallBacks); 52 52 if (!watchingArrayRef) … … 66 66 67 67 CFRelease(g_RunLoopRef); 68 68 69 69 return VINF_SUCCESS; 70 70 } … … 80 80 { 81 81 HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)info; 82 82 83 83 NOREF(arg0); /* SCDynamicStore */ 84 84 NOREF(arg1); /* CFArrayRef */ … … 93 93 SCDynamicStoreContext ctx; 94 94 RT_ZERO(ctx); 95 95 96 96 ctx.info = this; 97 97 98 g_store = SCDynamicStoreCreate(NULL, CFSTR("org.virtualbox.VBoxSVC"), 99 (SCDynamicStoreCallBack)HostDnsServiceDarwin::hostDnsServiceStoreCallback, 98 g_store = SCDynamicStoreCreate(NULL, CFSTR("org.virtualbox.VBoxSVC"), 99 (SCDynamicStoreCallBack)HostDnsServiceDarwin::hostDnsServiceStoreCallback, 100 100 &ctx); 101 101 AssertReturn(g_store, E_FAIL); … … 110 110 int rc = RTSemEventCreate(&g_DnsInitEvent); 111 111 AssertRCReturn(rc, E_FAIL); 112 112 113 113 return update(); 114 114 } … … 142 142 m_DomainName.setNull(); 143 143 144 CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(g_store, 144 CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(g_store, 145 145 kStateNetworkGlobalDNSKey); 146 146 /** 147 * 0:vvl@nb-mbp-i7-2(0)# scutil 147 * 0:vvl@nb-mbp-i7-2(0)# scutil 148 148 * > get State:/Network/Global/DNS 149 149 * > d.show … … 161 161 * } 162 162 */ 163 163 164 164 if (!propertyRef) 165 165 return S_OK; 166 166 167 167 CFStringRef domainNameRef = (CFStringRef)CFDictionaryGetValue( 168 168 static_cast<CFDictionaryRef>(propertyRef), CFSTR("DomainName")); 169 169 if (domainNameRef) 170 170 { 171 const char *pszDomainName = CFStringGetCStringPtr(domainNameRef, 171 const char *pszDomainName = CFStringGetCStringPtr(domainNameRef, 172 172 CFStringGetSystemEncoding()); 173 173 if (pszDomainName) … … 187 187 continue; 188 188 189 const char *pszServerAddress = CFStringGetCStringPtr(serverAddressRef, 189 const char *pszServerAddress = CFStringGetCStringPtr(serverAddressRef, 190 190 CFStringGetSystemEncoding()); 191 191 if (!pszServerAddress) 192 192 continue; 193 193 194 194 m_llNameServers.push_back(com::Utf8Str(pszServerAddress)); 195 195 } … … 201 201 { 202 202 arrayCount = CFArrayGetCount(searchArrayRef); 203 203 204 204 for (i = 0; i < arrayCount; ++i) 205 205 { … … 208 208 continue; 209 209 210 const char *pszSearchString = CFStringGetCStringPtr(searchStringRef, 210 const char *pszSearchString = CFStringGetCStringPtr(searchStringRef, 211 211 CFStringGetSystemEncoding()); 212 212 if (!pszSearchString) 213 213 continue; 214 214 215 215 m_llSearchStrings.push_back(com::Utf8Str(pszSearchString)); 216 216 } -
trunk/src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Main/src-server/darwin/iokit.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Main/src-server/linux/NetIf-linux.cpp
r48180 r48955 111 111 } 112 112 } 113 113 114 114 if (uSpeed == 0) 115 115 { -
trunk/src/VBox/Main/src-server/linux/USBGetDevices.cpp
r47117 r48955 1587 1587 * in the environment. 1588 1588 * @returns iprt status value 1589 * @param pfUsingUsbfsDevices on success this will be set to true if 1589 * @param pfUsingUsbfsDevices on success this will be set to true if 1590 1590 * the prefered access method is USBFS-like and to 1591 1591 * false if it is sysfs/device node-like -
trunk/src/VBox/Main/src-server/solaris/DynLoadLibSolaris.cpp
-
Property svn:keywords
changed from
Id
toId Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp
r48805 r48955 14 14 HostDnsServiceWin::HostDnsServiceWin() 15 15 { 16 RegOpenKeyEx(HKEY_LOCAL_MACHINE, 17 TEXT("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"), 18 16 RegOpenKeyEx(HKEY_LOCAL_MACHINE, 17 TEXT("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"), 18 0, KEY_READ, &g_hKeyTcpipParameters); 19 19 } 20 20 … … 24 24 if (!g_hKeyTcpipParameters) 25 25 { 26 26 RegCloseKey(g_hKeyTcpipParameters); 27 27 g_hKeyTcpipParameters = 0; 28 28 } … … 69 69 RT_ZERO(abNameServers); 70 70 RT_ZERO(abSearchList); 71 71 72 72 regIndex = 0; 73 73 do { … … 77 77 BYTE keyData[1024]; 78 78 DWORD cbKeyData = 1024; 79 79 80 80 hrc = RegEnumValueA(g_hKeyTcpipParameters, regIndex, keyName, &cbKeyName, 0, 81 81 &keyType, keyData, &cbKeyData); 82 if ( hrc == ERROR_SUCCESS 82 if ( hrc == ERROR_SUCCESS 83 83 || hrc == ERROR_MORE_DATA) 84 84 { 85 if ( RTStrICmp("Domain", keyName) == 0 85 if ( RTStrICmp("Domain", keyName) == 0 86 86 && cbKeyData > 1 87 87 && cbKeyData < 256) … … 94 94 memcpy(abDomain, keyData, cbKeyData); 95 95 96 else if ( RTStrICmp("NameServer", keyName) == 0 96 else if ( RTStrICmp("NameServer", keyName) == 0 97 97 && cbKeyData > 1 98 98 && cbKeyData < 256) 99 99 memcpy(abNameServers, keyData, cbKeyData); 100 101 else if ( RTStrICmp("DhcpNameServer", keyName) == 0 100 101 else if ( RTStrICmp("DhcpNameServer", keyName) == 0 102 102 && cbKeyData > 1 103 103 && abNameServers[0] == 0 … … 105 105 memcpy(abNameServers, keyData, cbKeyData); 106 106 107 else if ( RTStrICmp("SearchList", keyName) == 0 107 else if ( RTStrICmp("SearchList", keyName) == 0 108 108 && cbKeyData > 1 109 109 && cbKeyData < 256) … … 120 120 /* search list */ 121 121 strList2List(m_llSearchStrings, (char *)abNameServers); 122 122 123 123 return S_OK; 124 124 } -
trunk/src/VBox/Main/testcase/tstAPI.cpp
r48490 r48955 1525 1525 session->COMGETTER(Machine)(machine.asOutParam()); 1526 1526 CHECK_ERROR_BREAK(machine, COMGETTER(BandwidthControl)(bwCtrl.asOutParam())); 1527 1527 1528 1528 RTPrintf("Creating bandwidth group named '%ls'...\n", grpName.raw()); 1529 1529 CHECK_ERROR_BREAK(bwCtrl, CreateBandwidthGroup(grpName.raw(), BandwidthGroupType_Network, 123)); -
trunk/src/VBox/Main/testcase/tstMediumLock.cpp
r48297 r48955 123 123 { 124 124 RTTestSub(hTest, "Write locks"); 125 125 ComPtr<IToken> pToken1, pToken2; 126 126 127 127 MediumState_T mediumState = MediumState_NotCreated; … … 137 137 138 138 TEST_COM_FAILURE(hTest, pMedium->LockWrite(pToken2.asOutParam()), "nested write lock succeeded"); 139 139 if (!pToken2.isNull()) 140 140 RTTestFailed(hTest, "pToken2 is not null"); 141 141 … … 144 144 RTTestFailed(hTest, "wrong after nested lock write medium state %d", mediumState); 145 145 146 146 if (!pToken1.isNull()) 147 147 TEST_COM_SUCCESS(hTest, pToken1->Abandon(), "write unlock"); 148 148 else 149 149 RTTestFailed(hTest, "pToken1 is null"); 150 150 … … 157 157 { 158 158 RTTestSub(hTest, "Read locks"); 159 159 ComPtr<IToken> pToken1, pToken2; 160 160 161 161 MediumState_T mediumState = MediumState_NotCreated; … … 176 176 RTTestFailed(hTest, "wrong after nested lock read medium state %d", mediumState); 177 177 178 178 if (!pToken2.isNull()) 179 179 TEST_COM_SUCCESS(hTest, pToken2->Abandon(), "read nested unlock"); 180 180 else 181 181 RTTestFailed(hTest, "pToken2 is null"); 182 182 … … 185 185 RTTestFailed(hTest, "wrong after nested lock read medium state %d", mediumState); 186 186 187 187 if (!pToken1.isNull()) 188 188 TEST_COM_SUCCESS(hTest, pToken1->Abandon(), "read nested unlock"); 189 189 else 190 190 RTTestFailed(hTest, "pToken1 is null"); 191 191 … … 198 198 { 199 199 RTTestSub(hTest, "Mixing write and read locks"); 200 200 ComPtr<IToken> pToken1, pToken2; 201 201 202 202 MediumState_T mediumState = MediumState_NotCreated; … … 212 212 213 213 TEST_COM_FAILURE(hTest, pMedium->LockRead(pToken2.asOutParam()), "write+read lock succeeded"); 214 214 if (!pToken2.isNull()) 215 215 RTTestFailed(hTest, "pToken2 is not null"); 216 216 … … 219 219 RTTestFailed(hTest, "wrong after nested lock write medium state %d", mediumState); 220 220 221 221 if (!pToken1.isNull()) 222 222 TEST_COM_SUCCESS(hTest, pToken1->Abandon(), "write unlock"); 223 223 else 224 224 RTTestFailed(hTest, "pToken1 is null"); 225 225 … … 232 232 { 233 233 RTTestSub(hTest, "Mixing read and write locks"); 234 234 ComPtr<IToken> pToken1, pToken2; 235 235 236 236 MediumState_T mediumState = MediumState_NotCreated; … … 246 246 247 247 TEST_COM_FAILURE(hTest, pMedium->LockWrite(pToken2.asOutParam()), "read+write lock succeeded"); 248 248 if (!pToken2.isNull()) 249 249 RTTestFailed(hTest, "pToken2 is not null"); 250 250 … … 253 253 RTTestFailed(hTest, "wrong after nested lock read medium state %d", mediumState); 254 254 255 255 if (!pToken1.isNull()) 256 256 TEST_COM_SUCCESS(hTest, pToken1->Abandon(), "read unlock"); 257 257 else 258 258 RTTestFailed(hTest, "pToken1 is null"); 259 259
Note:
See TracChangeset
for help on using the changeset viewer.