summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-02-10 21:17:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-02-10 21:17:09 +0300
commit65c54b3f5471c66faec948faaef7c7a9af905ca4 (patch)
tree38c1d7008e940f8aac2984c850a57107a81504b5 /plugins
parent6f4ab7f2cdea0a0e7aeca266f7b2f0110d143e55 (diff)
Plugin Updater: attempt to fix hangout with very fast automatic updates
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp2
-rw-r--r--plugins/PluginUpdater/src/Events.cpp3
-rw-r--r--plugins/PluginUpdater/src/stdafx.h2
-rw-r--r--plugins/PluginUpdater/src/version.h2
4 files changed, 5 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index e79d94bdc4..af531456a0 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -870,7 +870,7 @@ void InitCheck()
CreateServiceFunction(MS_PU_CHECKUPDATES, MenuCommand);
}
-void CheckUpdateOnStartup()
+void CALLBACK CheckUpdateOnStartup()
{
if (g_plugin.bUpdateOnStartup) {
if (g_plugin.bOnlyOnceADay) {
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index d87904ddb4..245bd11a81 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -47,7 +47,6 @@ int ModulesLoaded(WPARAM, LPARAM)
DeleteDirectoryTreeW(CMStringW(g_wszRoot) + L"\\Backups");
}
- CheckUpdateOnStartup();
CreateTimer();
return 0;
}
@@ -61,6 +60,8 @@ int OnPreShutdown(WPARAM, LPARAM)
void InitEvents()
{
+ Miranda_WaitOnHandle(CheckUpdateOnStartup);
+
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
}
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index db71968ea2..ccac6fd5d8 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -234,6 +234,7 @@ void UnloadListNew();
void UnloadNetlib();
void CALLBACK RestartPrompt(void *);
+void CALLBACK CheckUpdateOnStartup(void);
int BackupFile(wchar_t *pwszSrcFileName, wchar_t *pwszBackFileName);
@@ -244,7 +245,6 @@ wchar_t* GetDefaultUrl();
bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc);
void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number);
-void CheckUpdateOnStartup();
void __stdcall InitTimer(void *type);
int unzip(const wchar_t *pwszZipFile, wchar_t *pwszDestPath, wchar_t *pwszBackPath, bool ch);
diff --git a/plugins/PluginUpdater/src/version.h b/plugins/PluginUpdater/src/version.h
index 2bb70dfb29..80406fc699 100644
--- a/plugins/PluginUpdater/src/version.h
+++ b/plugins/PluginUpdater/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 0
-#define __BUILD_NUM 10
+#define __BUILD_NUM 11
#include <stdver.h>