diff options
-rw-r--r-- | gpg_wrapper.cpp | 3 | ||||
-rw-r--r-- | main.cpp | 4 | ||||
-rw-r--r-- | messages.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/gpg_wrapper.cpp b/gpg_wrapper.cpp index de34f2c..df3e1fa 100644 --- a/gpg_wrapper.cpp +++ b/gpg_wrapper.cpp @@ -102,6 +102,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD CloseHandle(writestdin); CloseHandle(newstdout); CloseHandle(readstdout); + ReleaseMutex(gpg_mutex); *result = pxCreateProcessFailed; return pxCreateProcessFailed; } @@ -123,7 +124,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD inputpos+=transfered; Sleep(200); } - CloseHandle(gpg_mutex); + ReleaseMutex(gpg_mutex); storeOutput(readstdout,aoutput); @@ -481,7 +481,7 @@ static BOOL CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam, extern HANDLE new_key_hcnt; extern HANDLE new_key_hcnt_mutex; HANDLE hContact = new_key_hcnt; - CloseHandle(new_key_hcnt_mutex); + ReleaseMutex(new_key_hcnt_mutex); void ImportKey(); TCHAR *tmp = NULL; switch (msg) @@ -1155,7 +1155,7 @@ void ImportKey() extern HANDLE new_key_hcnt; extern HANDLE new_key_hcnt_mutex; HANDLE hContact = new_key_hcnt; - CloseHandle(new_key_hcnt_mutex); + ReleaseMutex(new_key_hcnt_mutex); DBWriteContactSettingTString(hContact, szGPGModuleName, "GPGPubKey", new_key.c_str()); { //gpg execute block wstring cmd; diff --git a/messages.cpp b/messages.cpp index 4f2fa41..46e54ad 100644 --- a/messages.cpp +++ b/messages.cpp @@ -522,7 +522,7 @@ int TestHook(WPARAM w, LPARAM l) static BOOL CALLBACK DlgProcKeyPassword(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { char *inkeyid = UniGetContactSettingUtf(new_key_hcnt, szGPGModuleName, "InKeyID", ""); - CloseHandle(new_key_hcnt_mutex); + ReleaseMutex(new_key_hcnt_mutex); TCHAR *tmp = NULL; switch (msg) |