Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2021-07-12 10:37:18 +0300
committerGitHub <noreply@github.com>2021-07-12 10:37:18 +0300
commitce90876bf02866ea08ab66c940f0c73ba66d531a (patch)
tree4abe079b8faed9f5623db8b5064735743c3c5132
parentf3903f906c83492ff6f1a0f868f022de4b3c9159 (diff)
parent4080d80d64037a2e9c91bfad0565eeb51de1e38b (diff)
Merge PR #5176: FIX(client): Plugin updater keeping plugin locked
PR #5152 overhauled the code for the plugin installer such that it can completely unload a plugin before attempting to overwrite it. However when the installer is called from the updater, that doesn't work since the installer itself was still holding a handle to that plugin, preventing it from unloading. Therefore this commit makes sure that the installer releases its handle before calling the installer. Fixes #4946
-rw-r--r--src/mumble/PluginUpdater.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mumble/PluginUpdater.cpp b/src/mumble/PluginUpdater.cpp
index 694f977a6..390ee026e 100644
--- a/src/mumble/PluginUpdater.cpp
+++ b/src/mumble/PluginUpdater.cpp
@@ -352,11 +352,16 @@ void PluginUpdater::on_updateDownloaded(QNetworkReply *reply) {
file.close();
try {
+ const QString pluginName = plugin->getName();
+ // We have to release the plugin handle here by resetting the smart-pointer in order to make sure the
+ // installer can really unload the plugin in order to overwrite it.
+ plugin.reset();
+
// Launch installer
PluginInstaller installer(QFileInfo(file.fileName()));
installer.install();
- Log::logOrDefer(Log::Information, tr("Successfully updated plugin \"%1\"").arg(plugin->getName()));
+ Log::logOrDefer(Log::Information, tr("Successfully updated plugin \"%1\"").arg(pluginName));
// Make sure Mumble won't use the old version of the plugin
Global::get().pluginManager->rescanPlugins();