Changeset 21826 in vbox
- Timestamp:
- Jul 27, 2009 8:00:42 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r21823 r21826 1730 1730 *aSnapshotCount = !mData->mFirstSnapshot 1731 1731 ? 0 1732 : mData->mFirstSnapshot->get GrandChildrenCount() + 1;1732 : mData->mFirstSnapshot->getAllChildrenCount() + 1; 1733 1733 1734 1734 return S_OK; … … 4331 4331 size_t snapshotCount = 0; 4332 4332 if (mData->mFirstSnapshot) 4333 snapshotCount = mData->mFirstSnapshot->get GrandChildrenCount() + 1;4333 snapshotCount = mData->mFirstSnapshot->getAllChildrenCount() + 1; 4334 4334 if (snapshotCount) 4335 4335 return setError (VBOX_E_INVALID_OBJECT_STATE, … … 9214 9214 AutoWriteLock snapshotLock(snapshot); 9215 9215 9216 size_t childrenCount = snapshot->get GrandChildrenCount();9216 size_t childrenCount = snapshot->getChildrenCount(); 9217 9217 if (childrenCount > 1) 9218 9218 return setError(VBOX_E_INVALID_OBJECT_STATE, -
trunk/src/VBox/Main/SnapshotImpl.cpp
r21825 r21826 406 406 } 407 407 408 ULONG Snapshot::get GrandChildrenCount()408 ULONG Snapshot::getChildrenCount() 409 409 { 410 410 AutoCaller autoCaller(this); … … 414 414 AutoReadLock alock(this); 415 415 416 return (ULONG)m->llChildren.size(); 417 } 418 419 ULONG Snapshot::getAllChildrenCountImpl() 420 { 421 AutoCaller autoCaller(this); 422 AssertComRC(autoCaller.rc()); 423 424 AutoReadLock alock(this); 416 425 ULONG count = (ULONG)m->llChildren.size(); 417 426 for (SnapshotsList::const_iterator it = m->llChildren.begin(); … … 419 428 ++it) 420 429 { 421 count += (*it)->get GrandChildrenCount();430 count += (*it)->getAllChildrenCountImpl(); 422 431 } 423 432 424 433 return count; 434 } 435 436 ULONG Snapshot::getAllChildrenCount() 437 { 438 AutoCaller autoCaller(this); 439 AssertComRC(autoCaller.rc()); 440 441 AutoReadLock chLock(m->pMachine->snapshotsTreeLockHandle()); 442 return getAllChildrenCountImpl(); 425 443 } 426 444 -
trunk/src/VBox/Main/include/SnapshotImpl.h
r21823 r21826 100 100 } 101 101 102 ULONG getGrandChildrenCount(); 102 ULONG getChildrenCount(); 103 ULONG getAllChildrenCount(); 104 ULONG getAllChildrenCountImpl(); 103 105 104 106 ComPtr<SnapshotMachine> getSnapshotMachine();
Note:
See TracChangeset
for help on using the changeset viewer.