Changeset 66294 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Mar 28, 2017 11:48:21 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r65120 r66294 2437 2437 2438 2438 #if !defined(VBOX_COM_INPROC) 2439 2439 2440 /** 2440 2441 * Refreshes the specified extension pack. … … 2640 2641 if (pExtPack && a_fReplace) 2641 2642 { 2642 if (!i_areThereAnyRunningVMs()) 2643 hrc = pExtPack->i_callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/); 2644 else 2643 /* We must leave the lock when calling i_areThereAnyRunningVMs, 2644 which means we have to redo the refresh call afterwards. */ 2645 autoLock.release(); 2646 bool fRunningVMs = i_areThereAnyRunningVMs(); 2647 autoLock.acquire(); 2648 hrc = i_refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack); 2649 if (fRunningVMs) 2645 2650 { 2646 2651 LogRel(("Install extension pack '%s' failed because at least one VM is still running.", pStrName->c_str())); … … 2648 2653 pStrName->c_str()); 2649 2654 } 2655 else if (SUCCEEDED(hrc) && pExtPack) 2656 hrc = pExtPack->i_callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/); 2650 2657 } 2651 2658 else if (pExtPack) … … 2743 2750 AutoCaller autoCaller(this); 2744 2751 HRESULT hrc = autoCaller.rc(); 2745 2746 2752 if (SUCCEEDED(hrc)) 2747 2753 { 2748 AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);2749 2754 if (a_fForcedRemoval || !i_areThereAnyRunningVMs()) 2750 2755 { 2756 AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); 2757 2751 2758 /* 2752 2759 * Refresh the data we have on the extension pack as it may be made … … 2818 2825 */ 2819 2826 if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON) 2820 {2821 autoLock.release();2822 2827 i_callAllVirtualBoxReadyHooks(); 2823 }2824 2828 } 2825 2829 … … 2852 2856 } 2853 2857 } 2854 #endif 2858 2859 #endif /* !VBOX_COM_INPROC */ 2855 2860 2856 2861 /**
Note:
See TracChangeset
for help on using the changeset viewer.