diff options
Diffstat (limited to 'plugins/PackUpdater')
-rw-r--r-- | plugins/PackUpdater/Src/Common.h | 4 | ||||
-rw-r--r-- | plugins/PackUpdater/Src/Events.cpp | 4 | ||||
-rw-r--r-- | plugins/PackUpdater/Src/PackUpdater.cpp | 4 | ||||
-rw-r--r-- | plugins/PackUpdater/Src/Utils.cpp | 22 |
4 files changed, 17 insertions, 17 deletions
diff --git a/plugins/PackUpdater/Src/Common.h b/plugins/PackUpdater/Src/Common.h index 5317428f06..881a558062 100644 --- a/plugins/PackUpdater/Src/Common.h +++ b/plugins/PackUpdater/Src/Common.h @@ -95,7 +95,7 @@ extern BYTE Reminder, UpdateOnStartup, UpdateOnPeriod, OnlyOnceADay, PeriodMeasu extern TCHAR tszRoot[MAX_PATH], tszDialogMsg[2048];
extern FILEINFO* pFileInfo;
extern FILEURL* pFileUrl;
-extern HANDLE CheckThread, hOnPreShutdown, hOptHook, hLoadHook;
+extern HANDLE hCheckThread, hOnPreShutdown, hOptHook, hLoadHook;
extern MYOPTIONS MyOptions;
extern aPopups PopupsList[POPUPS];
extern LPCTSTR Title, Text;
@@ -111,7 +111,7 @@ INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam); INT_PTR EmptyFolder(WPARAM wParam,LPARAM lParam);
INT OnPreShutdown(WPARAM wParam, LPARAM lParam);
INT OptInit(WPARAM wParam, LPARAM lParam);
-VOID DoCheck(INT iFlag, INT iFlag2);
+VOID DoCheck(INT iFlag);
BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
VOID show_popup(HWND hDlg, LPCTSTR Title, LPCTSTR Text, INT Number, INT ActType);
VOID DlgDownloadProc();
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp index 85cd8ea63f..f1fd530493 100644 --- a/plugins/PackUpdater/Src/Events.cpp +++ b/plugins/PackUpdater/Src/Events.cpp @@ -38,7 +38,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) Hotkey_Register(&hkd);
if (AllowUpdateOnStartup())
- DoCheck(UpdateOnStartup, (int)CheckThread);
+ DoCheck(UpdateOnStartup);
Timer = CreateWaitableTimer(NULL, FALSE, NULL);
InitTimer();
@@ -49,7 +49,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam)
{
Silent = false;
- DoCheck(1, (int)CheckThread);
+ DoCheck(TRUE);
return 0;
}
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp index 24086278ab..ed5213062e 100644 --- a/plugins/PackUpdater/Src/PackUpdater.cpp +++ b/plugins/PackUpdater/Src/PackUpdater.cpp @@ -98,8 +98,8 @@ extern "C" __declspec(dllexport) int Load(void) extern "C" __declspec(dllexport) int Unload(void)
{
- if (CheckThread)
- CheckThread = NULL;
+ if (hCheckThread)
+ hCheckThread = NULL;
NetlibUnInit();
DestroyServiceFunction(hCheckUpdates);
DestroyServiceFunction(hEmptyFolder);
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index 5e438cd934..f68f2ba46b 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -28,7 +28,7 @@ INT Period; TCHAR tszDialogMsg[2048] = {0};
FILEINFO* pFileInfo = NULL;
FILEURL* pFileUrl = NULL;
-HANDLE CheckThread = NULL, hNetlibUser = NULL;
+HANDLE hCheckThread = NULL, hNetlibUser = NULL;
MYOPTIONS MyOptions = {0};
aPopups PopupsList[POPUPS];
LPCTSTR Title = {0}, Text = {0};
@@ -210,7 +210,7 @@ static void CheckUpdates(void *) else if (DBGetContactSettingByte(NULL, MODNAME, "Popups1M", DEFAULT_MESSAGE_ENABLED))
MessageBox(NULL, Text, Title, MB_ICONSTOP);
DBFreeVariant(&dbVar);
- CheckThread = NULL;
+ hCheckThread = NULL;
return;
}
// Download version info
@@ -225,7 +225,7 @@ static void CheckUpdates(void *) mir_free(pFileUrl);
if (!DlgDld)
{
- CheckThread = NULL;
+ hCheckThread = NULL;
return;
}
@@ -304,7 +304,7 @@ static void CheckUpdates(void *) {
MessageBox(NULL, TranslateT("Update is not possible!\nYou have no Administrator's rights.\nPlease run Miranda NG with Administrator's rights."), Title, MB_ICONINFORMATION);
DeleteFile(tszTmpIni);
- CheckThread = NULL;
+ hCheckThread = NULL;
return;
} // user have not admin's rights
else
@@ -365,7 +365,7 @@ static void CheckUpdates(void *) DeleteFile(tszTmpIni);
if (upd_ret == IDCANCEL)
{
- CheckThread = NULL;
+ hCheckThread = NULL;
return;
}
if (!UpdatesCount && !Silent)
@@ -392,12 +392,12 @@ static void CheckUpdates(void *) else if (DBGetContactSettingByte(NULL, MODNAME, "Popups2M", DEFAULT_MESSAGE_ENABLED))
MessageBox(NULL, Text, Title, MB_ICONINFORMATION);
}
- CheckThread = NULL;
-}//end* static void CheckUpdates(void *)
+ hCheckThread = NULL;
+}
-void DoCheck(int iFlag, int iFlag2)
+void DoCheck(int iFlag)
{
- if (iFlag2)
+ if (hCheckThread != NULL)
{
Title = TranslateT("Pack Updater");
Text = TranslateT("Update checking already started!");
@@ -411,7 +411,7 @@ void DoCheck(int iFlag, int iFlag2) }
else if (iFlag)
{
- CheckThread = mir_forkthread(CheckUpdates, 0);
+ hCheckThread = mir_forkthread(CheckUpdates, 0);
DBWriteContactSettingDword(NULL, MODNAME, "LastUpdate", time(NULL));
}
}
@@ -451,7 +451,7 @@ LONG PeriodToMilliseconds(const INT period, BYTE& periodMeasure) VOID CALLBACK TimerAPCProc(LPVOID lpArg, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
{
- DoCheck(1, (int)CheckThread);
+ DoCheck(TRUE);
}
VOID InitTimer()
|