diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-11 13:43:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-11 13:43:44 +0000 |
commit | 99b0796eb6cd0bcc7d7facdd1a1a6834cca588dd (patch) | |
tree | cda401c44fc86b6eeb73cab594d682150e5b5c94 /plugins/PluginUpdater | |
parent | f01a47f097c67d7636cda151e0681a4eb538aa32 (diff) |
various mir_forkthread quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@3975 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r-- | plugins/PluginUpdater/src/Common.h | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 4 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Scanner.cpp | 10 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h index 33a5b031db..f0ffa25310 100644 --- a/plugins/PluginUpdater/src/Common.h +++ b/plugins/PluginUpdater/src/Common.h @@ -114,7 +114,7 @@ extern HINSTANCE hInst; extern TCHAR tszRoot[MAX_PATH], tszDialogMsg[2048], tszTempPath[MAX_PATH];
extern FILEINFO *pFileInfo;
-extern HANDLE CheckThread, hPluginUpdaterFolder;
+extern HANDLE hCheckThread, hPluginUpdaterFolder;
extern PlugOptions opts;
extern POPUP_OPTIONS PopupOptions;
extern aPopups PopupsList[POPUPS];
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 610d87e284..d0875df06c 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -131,8 +131,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);
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp index 86c0acceb3..bb9f7e339b 100644 --- a/plugins/PluginUpdater/src/Scanner.cpp +++ b/plugins/PluginUpdater/src/Scanner.cpp @@ -297,7 +297,7 @@ static void CheckUpdates(void *) mir_sntprintf(pFileUrl.tszDiskPath, SIZEOF(pFileUrl.tszDiskPath), _T("%s\\hashes.zip"), tszTempPath);
if (!DownloadFile(pFileUrl.tszDownloadURL, pFileUrl.tszDiskPath, 0)) {
ShowPopup(0, LPGENT("Plugin Updater"), LPGENT("An error occured while downloading the update."), 1, 0);
- CheckThread = NULL;
+ hCheckThread = NULL;
return;
}
@@ -308,7 +308,7 @@ static void CheckUpdates(void *) mir_sntprintf(tszTmpIni, SIZEOF(tszTmpIni), _T("%s\\hashes.txt"), tszTempPath);
FILE *fp = _tfopen(tszTmpIni, _T("r"));
if (!fp) {
- CheckThread = NULL;
+ hCheckThread = NULL;
return;
}
@@ -351,12 +351,12 @@ static void CheckUpdates(void *) }
else CallFunctionAsync(LaunchDialog, UpdateFiles);
- CheckThread = NULL;
+ hCheckThread = NULL;
}
void DoCheck(int iFlag)
{
- if (CheckThread)
+ if (hCheckThread)
ShowPopup(0, LPGENT("Plugin Updater"), LPGENT("Update checking already started!"), 2, 0);
else if (hwndDialog) {
ShowWindow(hwndDialog, SW_SHOW);
@@ -364,7 +364,7 @@ void DoCheck(int iFlag) SetFocus(hwndDialog);
}
else if (iFlag) {
- CheckThread = mir_forkthread(CheckUpdates, 0);
+ hCheckThread = mir_forkthread(CheckUpdates, 0);
DBWriteContactSettingDword(NULL, MODNAME, "LastUpdate", time(NULL));
}
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 4d169825f2..bb2ee1380a 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -23,7 +23,7 @@ BOOL DlgDld; int Number = 0;
TCHAR tszDialogMsg[2048] = {0};
FILEINFO *pFileInfo = NULL;
-HANDLE CheckThread = NULL, hNetlibUser = NULL;
+HANDLE hCheckThread = NULL, hNetlibUser = NULL;
POPUP_OPTIONS PopupOptions = {0};
aPopups PopupsList[POPUPS];
|