Changeset 45367 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 5, 2013 1:02:06 PM (12 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DHCPServerRunner.h
r44529 r45367 54 54 int setOption(DHCPCFG opt, const char *val, bool enabled) 55 55 { 56 if (opt == 0 || opt >= DHCPCFG_NOTOPT_MAXVAL)56 if (opt == 0 || opt >= DHCPCFG_NOTOPT_MAXVAL) 57 57 return VERR_INVALID_PARAMETER; 58 if (isRunning())58 if (isRunning()) 59 59 return VERR_INVALID_STATE; 60 60 -
trunk/src/VBox/Main/include/NATNetworkServiceRunner.h
r45138 r45367 44 44 int setOption(NATSCCFG opt, const char *val, bool enabled) 45 45 { 46 if (opt == 0 || opt >= NATSCCFG_NOTOPT_MAXVAL)46 if (opt == 0 || opt >= NATSCCFG_NOTOPT_MAXVAL) 47 47 return VERR_INVALID_PARAMETER; 48 if (isRunning())48 if (isRunning()) 49 49 return VERR_INVALID_STATE; 50 50 -
trunk/src/VBox/Main/include/netif.h
r45145 r45367 124 124 DECLINLINE(int) prefixLength2IPv6Address(ULONG cPrefix, PRTNETADDRIPV6 aAddrPtr) 125 125 { 126 if (cPrefix > 128)126 if (cPrefix > 128) 127 127 return VERR_INVALID_PARAMETER; 128 if (!aAddrPtr)128 if (!aAddrPtr) 129 129 return VERR_INVALID_PARAMETER; 130 130 -
trunk/src/VBox/Main/include/ovfreader.h
r45354 r45367 170 170 OVFVersion_T getOVFVersion() const 171 171 { 172 if (version == "0.9")172 if (version == "0.9") 173 173 return OVFVersion_0_9; 174 else if (version == "1.0")174 else if (version == "1.0") 175 175 return OVFVersion_1_0; 176 else if (version == "2.0")176 else if (version == "2.0") 177 177 return OVFVersion_2_0; 178 178 else … … 183 183 RTCString getStringOVFVersion() const 184 184 { 185 if (version == "0.9")185 if (version == "0.9") 186 186 return "0.9"; 187 else if (version == "1.0")187 else if (version == "1.0") 188 188 return "1.0"; 189 else if (version == "2.0")189 else if (version == "2.0") 190 190 return "2.0"; 191 191 else -
trunk/src/VBox/Main/src-all/ProgressImpl.cpp
r44528 r45367 884 884 * have to loop as long as we reached the same operation count. */ 885 885 ULONG curOp; 886 for (;;)886 for (;;) 887 887 { 888 888 rc = pProgressAsync->COMGETTER(Operation(&curOp)); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r45276 r45367 472 472 for (size_t j = 0; j < u32Size; ++j) 473 473 { 474 if (aSataPortUsed[j] > lBaseVal &&475 aSataPortUsed[j] <= lNextPortUsed)474 if ( aSataPortUsed[j] > lBaseVal 475 && aSataPortUsed[j] <= lNextPortUsed) 476 476 lNextPortUsed = aSataPortUsed[j]; 477 477 } … … 1669 1669 LONG lPortNum = 0; 1670 1670 hrc = pMediumAtt->COMGETTER(Port)(&lPortNum); H(); 1671 if (SUCCEEDED(hrc))1671 if (SUCCEEDED(hrc)) 1672 1672 { 1673 1673 DeviceType_T lType; 1674 1674 hrc = pMediumAtt->COMGETTER(Type)(&lType); H(); 1675 if (SUCCEEDED(hrc) && lType == DeviceType_HardDisk)1675 if (SUCCEEDED(hrc) && lType == DeviceType_HardDisk) 1676 1676 { 1677 1677 /* find min port number used for HD */ 1678 if (lPortNum < lPortLUN[0])1678 if (lPortNum < lPortLUN[0]) 1679 1679 lPortLUN[0] = lPortNum; 1680 1680 lPortUsed[u32HDSataPortCount++] = lPortNum; -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r45109 r45367 656 656 int rc = VINF_SUCCESS; 657 657 size_t p = 0; 658 while (p < listPair.size() && RT_SUCCESS(rc))658 while (p < listPair.size() && RT_SUCCESS(rc)) 659 659 { 660 660 Utf8Str strKey = listPair.at(p++); -
trunk/src/VBox/Main/src-client/GuestDnDImpl.cpp
r42278 r45367 441 441 RTCList<RTCString> list = strFormats.split("\r\n"); 442 442 size_t i = 0; 443 while (i < list.size())443 while (i < list.size()) 444 444 { 445 445 /* Only keep allowed format types. */ -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r45354 r45367 274 274 } 275 275 276 bool checkComplianceDigestAndOVFVersion(bool digestType, ovf::OVFVersion_T ovfVersion)276 bool checkComplianceDigestAndOVFVersion(bool fDigestType, ovf::OVFVersion_T ovfVersion) 277 277 { 278 278 bool res = false; 279 if ( (ovfVersion == ovf::OVFVersion_2_0 && digestType == true) ||280 (ovfVersion == ovf::OVFVersion_1_0 && digestType == false) ||281 (ovfVersion == ovf::OVFVersion_0_9 && digestType == false))279 if ( (ovfVersion == ovf::OVFVersion_2_0 && fDigestType) 280 || (ovfVersion == ovf::OVFVersion_1_0 && !fDigestType) 281 || (ovfVersion == ovf::OVFVersion_0_9 && !fDigestType)) 282 282 res = true; 283 283 return res; … … 794 794 we have to loop as long as we reached the same operation count. */ 795 795 ULONG curOp; 796 for (;;)796 for (;;) 797 797 { 798 798 rc = pProgressAsync->COMGETTER(Operation(&curOp)); -
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r45227 r45367 1677 1677 } 1678 1678 rc = writeFSImpl(pTask, writeLock, pShaIo, &storage); 1679 } while(0);1679 } while (0); 1680 1680 1681 1681 /* Cleanup */ … … 1731 1731 } 1732 1732 rc = writeFSImpl(pTask, writeLock, pShaIo, &storage); 1733 } while(0);1733 } while (0); 1734 1734 1735 1735 RTTarClose(tar); … … 1742 1742 1743 1743 /* Delete ova file on error */ 1744 if (FAILED(rc))1744 if (FAILED(rc)) 1745 1745 RTFileDelete(pTask->locInfo.strPath.c_str()); 1746 1746 -
trunk/src/VBox/Main/src-server/ApplianceImplIO.cpp
r42389 r45367 108 108 # define DEBUG_PRINT_FLOW() RTPrintf("%s\n", __FUNCTION__) 109 109 #else 110 # define DEBUG_PRINT_FLOW() do {} while (0)110 # define DEBUG_PRINT_FLOW() do {} while (0) 111 111 #endif 112 112 … … 478 478 int rc = VINF_SUCCESS; 479 479 bool fLoop = true; 480 while (fLoop)480 while (fLoop) 481 481 { 482 482 /* What should we do next? */ … … 756 756 } 757 757 } 758 while (0);758 while (0); 759 759 760 760 if (RT_FAILURE(rc)) … … 1015 1015 { 1016 1016 rc = shaSignalManifestThread(pInt, STATUS_WRITE); 1017 if (RT_FAILURE(rc))1017 if (RT_FAILURE(rc)) 1018 1018 break; 1019 1019 /* If there is _no_ free space available, we have to wait until it is. */ … … 1102 1102 { 1103 1103 rc = shaSignalManifestThread(pInt, STATUS_READ); 1104 if (RT_FAILURE(rc))1104 if (RT_FAILURE(rc)) 1105 1105 break; 1106 1106 /* If there is _no_ data available, we have to wait until it is. */ … … 1275 1275 cbAllRead += cbRead; 1276 1276 } 1277 } while(0);1277 } while (0); 1278 1278 1279 1279 pIfIo->pfnClose(pvUser, pvStorage); -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r45354 r45367 852 852 RTFILE pFile = NULL; 853 853 vrc = RTFileOpen(&pFile, strMfFile.c_str(), RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_NONE); 854 if (RT_SUCCESS(vrc) && pFile != NULL)854 if (RT_SUCCESS(vrc) && pFile != NULL) 855 855 { 856 856 uint64_t cbFile = 0; … … 932 932 } 933 933 934 }while (0);934 }while (0); 935 935 936 936 /* Cleanup */ … … 1068 1068 break; 1069 1069 1070 } while(0);1070 } while (0); 1071 1071 1072 1072 RTTarClose(tar); -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r45051 r45367 549 549 int rc = VERR_GENERAL_FAILURE; 550 550 551 hr = pncc->GetDisplayName( &lpszName);551 hr = pncc->GetDisplayName(&lpszName); 552 552 Assert(hr == S_OK); 553 553 if (hr == S_OK) … … 642 642 643 643 /* we are using the INetCfg API for getting the list of miniports */ 644 hr = VBoxNetCfgWinQueryINetCfg( 645 VBOX_APP_NAME,646 &pNc,647 &lpszApp);644 hr = VBoxNetCfgWinQueryINetCfg(FALSE, 645 VBOX_APP_NAME, 646 &pNc, 647 &lpszApp); 648 648 Assert(hr == S_OK); 649 649 if (hr == S_OK) … … 668 668 hr = VBoxNetCfgWinGetBindingPathEnum(pTcpIpNcc, EBP_BELOW, &pEnumBp); 669 669 Assert(hr == S_OK); 670 if ( hr == S_OK)670 if (hr == S_OK) 671 671 { 672 672 hr = VBoxNetCfgWinGetFirstBindingPath(pEnumBp, &pBp); 673 673 Assert(hr == S_OK || hr == S_FALSE); 674 while ( hr == S_OK)674 while (hr == S_OK) 675 675 { 676 676 /* S_OK == enabled, S_FALSE == disabled */ … … 679 679 hr = VBoxNetCfgWinGetBindingInterfaceEnum(pBp, &pEnumBi); 680 680 Assert(hr == S_OK); 681 if ( hr == S_OK)681 if (hr == S_OK) 682 682 { 683 683 hr = VBoxNetCfgWinGetFirstBindingInterface(pEnumBi, &pBi); 684 684 Assert(hr == S_OK); 685 while (hr == S_OK)685 while (hr == S_OK) 686 686 { 687 hr = pBi->GetLowerComponent( &pMpNcc);687 hr = pBi->GetLowerComponent(&pMpNcc); 688 688 Assert(hr == S_OK); 689 689 if (hr == S_OK) … … 699 699 } 700 700 } 701 VBoxNetCfgWinReleaseRef( pMpNcc);701 VBoxNetCfgWinReleaseRef(pMpNcc); 702 702 } 703 703 VBoxNetCfgWinReleaseRef(pBi); -
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r45098 r45367 2524 2524 2525 2525 { 2526 if ( pSource_local.isNull() ||2527 pSource_local == pTarget_local)2526 if ( pSource_local.isNull() 2527 || pSource_local == pTarget_local) 2528 2528 { 2529 2529 ++it_md; -
trunk/src/VBox/Main/src-server/USBControllerImpl.cpp
r42551 r45367 437 437 438 438 AutoCaller autoCaller(this); 439 if (FAILED(autoCaller.rc())) return autoCaller.rc();439 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 440 440 441 441 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); -
trunk/src/VBox/Main/src-server/generic/NetIf-generic.cpp
r44742 r45367 316 316 int rc = VINF_SUCCESS; 317 317 HRESULT hr = pVBox->COMGETTER(Host)(host.asOutParam()); 318 if (SUCCEEDED(hr))318 if (SUCCEEDED(hr)) 319 319 { 320 320 Bstr ifname; … … 329 329 Bstr("Removing host network interface").raw(), 330 330 FALSE /* aCancelable */); 331 if (SUCCEEDED(rc))331 if (SUCCEEDED(rc)) 332 332 { 333 333 progress.queryInterfaceTo(aProgress); -
trunk/src/VBox/Main/src-server/linux/HostHardwareLinux.cpp
r44528 r45367 1283 1283 if (RT_FAILURE(rc = pipeCreateSimple(&mhWakeupPipeR, &mhWakeupPipeW))) 1284 1284 break; 1285 } while (0);1285 } while (0); 1286 1286 mStatus = rc; 1287 1287 if (RT_FAILURE(rc)) -
trunk/src/VBox/Main/src-server/linux/USBGetDevices.cpp
r44528 r45367 1431 1431 } 1432 1432 # define dlsym testDLSym 1433 # define close(a) do {} while (0)1433 # define close(a) do {} while (0) 1434 1434 #endif 1435 1435 -
trunk/src/VBox/Main/src-server/solaris/USBProxyServiceSolaris.cpp
r41529 r45367 305 305 306 306 rc = DI_WALK_CONTINUE; 307 } while (0);307 } while (0); 308 308 309 309 di_devfs_path_free(pszDevicePath); -
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r45073 r45367 1513 1513 hr = pBp->EnumBindingInterfaces(&pEnumBi); 1514 1514 Assert(hr == S_OK); 1515 if ( hr == S_OK)1515 if (hr == S_OK) 1516 1516 { 1517 1517 hr = pEnumBi->Reset(); … … 1521 1521 while ((hr = pEnumBi->Next(1, &pBi, NULL)) == S_OK) 1522 1522 { 1523 hr = pBi->GetLowerComponent( &pMpNcc);1523 hr = pBi->GetLowerComponent(&pMpNcc); 1524 1524 Assert(hr == S_OK); 1525 1525 if (hr == S_OK) -
trunk/src/VBox/Main/testcase/tstCollector.cpp
r45051 r45367 64 64 break; \ 65 65 ++nCalls; \ 66 } while (RTTimeMilliTS() - start < RUN_TIME_MS); \66 } while (RTTimeMilliTS() - start < RUN_TIME_MS); \ 67 67 if (RT_FAILURE(rc)) \ 68 68 { \ … … 469 469 } 470 470 start = RTTimeMilliTS(); 471 while (RTTimeMilliTS() - start < 5000)471 while (RTTimeMilliTS() - start < 5000) 472 472 ; // Loop for 5 seconds 473 473 rc = collector->preCollect(hints, 0); -
trunk/src/VBox/Main/webservice/vboxweb.cpp
r45075 r45367 1444 1444 ssize_t cbOut = RTBase64DecodedSize(pszStr, NULL); 1445 1445 1446 if (cbOut > DECODE_STR_MAX)1446 if (cbOut > DECODE_STR_MAX) 1447 1447 { 1448 1448 WebLog("Decode string too long.\n");
Note:
See TracChangeset
for help on using the changeset viewer.