From 51f835c7711083e9b3288eaa8d4513f6ee955a45 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 Jan 2019 15:52:20 +0300 Subject: code cleaning --- protocols/Twitter/src/contacts.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'protocols/Twitter/src/contacts.cpp') diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 248cd0d59d..c87dafb226 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -161,12 +161,8 @@ void TwitterProto::GetAwayMsgWorker(void *arg) if (hContact == 0) return; - DBVARIANT dbv; - if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) { - ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal); - db_free(&dbv); - } - else ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0); + ptrW wszMsg(db_get_wsa(hContact, "CList", "StatusMsg")); + ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, wszMsg); } HANDLE TwitterProto::GetAwayMsg(MCONTACT hContact) -- cgit v1.2.3