diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-20 21:23:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-20 21:23:22 +0300 |
commit | dd6ac172c4f814fa4b5ace6caca80d00d7e01ac8 (patch) | |
tree | 805abd69e64f8e1f268e6415689de8742cac2215 /protocols/Weather/src | |
parent | 79d99837e0fefa32d695dba7e2a13b8a42f39da2 (diff) |
bunch of useless threads replaced with a call of ProtoBroadcastAsync
Diffstat (limited to 'protocols/Weather/src')
-rw-r--r-- | protocols/Weather/src/weather_svcs.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/protocols/Weather/src/weather_svcs.cpp b/protocols/Weather/src/weather_svcs.cpp index c3c9b4ab4b..bc86236668 100644 --- a/protocols/Weather/src/weather_svcs.cpp +++ b/protocols/Weather/src/weather_svcs.cpp @@ -170,12 +170,8 @@ static void __cdecl WeatherGetAwayMsgThread(void *arg) Sleep(100); MCONTACT hContact = (DWORD_PTR)arg; - DBVARIANT dbv; - if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) { - ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal); - db_free(&dbv); - } - else ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1); + ptrW wszStatus(db_get_wsa(hContact, "CList", "StatusMsg")); + ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, wszStatus); } static INT_PTR WeatherGetAwayMsg(WPARAM, LPARAM lParam) |