儲存庫 vbox 的更動 40491
- 時間撮記:
- 2012-3-15 下午08:52:05 (13 年 以前)
- 位置:
- trunk/src/VBox/Main
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/include/NetworkAdapterImpl.h
r37200 r40491 70 70 settings::StringsMap mGenericProperties; 71 71 ULONG mBootPriority; 72 ComObjPtr<BandwidthGroup>mBandwidthGroup;72 Utf8Str mBandwidthGroup; 73 73 }; 74 74 -
trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
r40490 r40491 1234 1234 data.ulBootPriority = mData->mBootPriority; 1235 1235 1236 if (mData->mBandwidthGroup.isNull()) 1237 data.strBandwidthGroup = ""; 1238 else 1239 data.strBandwidthGroup = mData->mBandwidthGroup->getName(); 1236 data.strBandwidthGroup = mData->mBandwidthGroup; 1240 1237 1241 1238 data.type = mData->mAdapterType; … … 1309 1306 if (mPeer) 1310 1307 { 1311 if (!mData->mBandwidthGroup.isNull())1312 {1313 Assert(!mData->mBandwidthGroup->getPeer().isNull() && mData->mBandwidthGroup->getPeer()->getPeer().isNull());1314 mData->mBandwidthGroup = mData->mBandwidthGroup->getPeer();1315 }1316 1308 /* attach new data to the peer and reshare it */ 1317 1309 mPeer->mData.attach(mData); … … 1403 1395 CheckComArgOutPointerValid(aBwGroup); 1404 1396 1405 AutoCaller autoCaller(this); 1406 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1407 1408 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1409 1410 mData->mBandwidthGroup.queryInterfaceTo(aBwGroup); 1397 HRESULT hrc = S_OK; 1398 1399 AutoCaller autoCaller(this); 1400 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1401 1402 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1403 1404 if (mData->mBandwidthGroup.isNotEmpty()) 1405 { 1406 ComObjPtr<BandwidthGroup> pBwGroup; 1407 hrc = mParent->getBandwidthGroup(mData->mBandwidthGroup, pBwGroup, true /* fSetError */); 1408 1409 Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence of the group was checked when it was attached. */ 1410 1411 if (SUCCEEDED(hrc)) 1412 pBwGroup.queryInterfaceTo(aBwGroup); 1413 } 1411 1414 1412 1415 LogFlowThisFuncLeave(); 1413 return S_OK;1416 return hrc; 1414 1417 } 1415 1418 … … 1427 1430 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1428 1431 1429 if (mData->mBandwidthGroup != aBwGroup) 1430 { 1432 Utf8Str strBwGroup; 1433 if (aBwGroup) 1434 strBwGroup = static_cast<BandwidthGroup*>(aBwGroup)->getName(); 1435 if (mData->mBandwidthGroup != strBwGroup) 1436 { 1437 ComObjPtr<BandwidthGroup> pBwGroup; 1438 if (!strBwGroup.isEmpty()) 1439 { 1440 HRESULT hrc = mParent->getBandwidthGroup(strBwGroup, pBwGroup, false /* fSetError */); 1441 1442 Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence of the group was checked when it was attached. */ 1443 } 1444 1431 1445 mData.backup(); 1432 1446 1433 updateBandwidthGroup( static_cast<BandwidthGroup*>(aBwGroup));1447 updateBandwidthGroup(pBwGroup); 1434 1448 1435 1449 m_fModified = true; … … 1454 1468 Assert(isWriteLockOnCurrentThread()); 1455 1469 1470 ComObjPtr<BandwidthGroup> pOldBwGroup; 1471 if (!mData->mBandwidthGroup.isEmpty()) 1472 { 1473 HRESULT hrc = mParent->getBandwidthGroup(mData->mBandwidthGroup, pOldBwGroup, false /* fSetError */); 1474 1475 Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence of the group was checked when it was attached. */ 1476 } 1477 1456 1478 mData.backup(); 1457 if (! mData->mBandwidthGroup.isNull())1458 { 1459 mData->mBandwidthGroup->release();1460 mData->mBandwidthGroup .setNull();1479 if (!pOldBwGroup.isNull()) 1480 { 1481 pOldBwGroup->release(); 1482 mData->mBandwidthGroup = Utf8Str::Empty; 1461 1483 } 1462 1484 1463 1485 if (aBwGroup) 1464 1486 { 1465 mData->mBandwidthGroup = aBwGroup ;1466 mData->mBandwidthGroup->reference();1487 mData->mBandwidthGroup = aBwGroup->getName(); 1488 aBwGroup->reference(); 1467 1489 } 1468 1490
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器