summaryrefslogtreecommitdiff
path: root/plugins/NotifyAnything
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-09-09 22:24:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-09-09 22:24:07 +0300
commit23f0b751b57b2dd9f6e912cec92364ff59b864b2 (patch)
tree9b38146c3602b5300856d00bedfc248bce5c7da0 /plugins/NotifyAnything
parent77a3554616362939d78649fd257f65e464312e68 (diff)
fix for a crappy ::GetCurrentThread call that breaks all Wait* functions
Diffstat (limited to 'plugins/NotifyAnything')
-rw-r--r--plugins/NotifyAnything/NotifyAnything.vcxproj5
-rw-r--r--plugins/NotifyAnything/src/main.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/plugins/NotifyAnything/NotifyAnything.vcxproj b/plugins/NotifyAnything/NotifyAnything.vcxproj
index 991f77c9a7..16d172e8cc 100644
--- a/plugins/NotifyAnything/NotifyAnything.vcxproj
+++ b/plugins/NotifyAnything/NotifyAnything.vcxproj
@@ -39,4 +39,9 @@
<ResourceCompile Include="res\NotifyAnything.rc" />
<ResourceCompile Include="res\Version.rc" />
</ItemGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project> \ No newline at end of file
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index 6c0c7fb9ae..bcfee4a9b3 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -837,7 +837,7 @@ void initWinsock()
void __cdecl udptcpThreadFunc(void *useUdp)
{
- MThreadHandle threadLock(useUdp ? g_udp_thread : g_tcp_thread);
+ MThreadLock threadLock(useUdp ? g_udp_thread : g_tcp_thread);
try
{
@@ -948,8 +948,8 @@ void __cdecl udptcpThreadFunc(void *useUdp)
void start_threads()
{
g_exit_threads = false;
- mir_forkthread(udptcpThreadFunc, (void *)1);
- mir_forkthread(udptcpThreadFunc);
+ g_udp_thread = mir_forkthread(udptcpThreadFunc, (void *)1);
+ g_tcp_thread = mir_forkthread(udptcpThreadFunc);
}
void stop_threads()