diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-23 15:52:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-23 15:52:20 +0300 |
commit | 51f835c7711083e9b3288eaa8d4513f6ee955a45 (patch) | |
tree | 2f86cd5c8f7d4342299cfebd9e385b4d7611dcd8 /protocols/Gadu-Gadu/src | |
parent | 26c0650cf4a720572fe262d40615ef8e3787368a (diff) |
code cleaning
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 686dd12c0c..186a283c06 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -588,27 +588,18 @@ int GaduProto::SetStatus(int iNewStatus) return 0;
}
+//////////////////////////////////////////////////////////
+// when away message is requested
+
void __cdecl GaduProto::getawaymsgthread(void *arg)
{
- DBVARIANT dbv;
-
MCONTACT hContact = (UINT_PTR)arg;
- debugLogA("getawaymsgthread(): started");
gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
- if (!db_get_s(hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_WCHAR)) {
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal);
- debugLogW(L"getawaymsgthread(): Reading away msg <%s>.", dbv.pwszVal);
- db_free(&dbv);
- }
- else {
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
- }
- debugLogA("getawaymsgthread(): end");
+
+ ptrW wszMsg(db_get_wsa(hContact, "CList", "StatusMsg"));
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, wszMsg);
}
-//////////////////////////////////////////////////////////
-// when away message is requested
-//
HANDLE GaduProto::GetAwayMsg(MCONTACT hContact)
{
#ifdef DEBUGMODE
|