From 5f8a607f900a42e27bf166b86185001aadf3e9f2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 13:50:53 +0000 Subject: more fun: - MS_AWAYMSG_GETSTATUSMSGW/T is present in any MIID_SRAWAY plugin, so there's no need to check its existence; - therefore MS_AWAYMSG_GETSTATUSMSG considered useless, cause it has no references git-svn-id: http://svn.miranda-ng.org/main/trunk@8293 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_rc.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index b1ae868e3a..3f72827bce 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -323,16 +323,15 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Change global status")) << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("status-global")); - char* szStatusMsg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0); - if (szStatusMsg) { - fieldNode << XCHILD(_T("value"), _A2T(szStatusMsg)); - mir_free(szStatusMsg); - } + ptrT tszStatusMsg((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, status, 0)); + if (tszStatusMsg) + fieldNode << XCHILD(_T("value"), szStatusMsg); m_ThreadInfo->send(iq); return JABBER_ADHOC_HANDLER_STATUS_EXECUTING; } - else if (pSession->GetStage() == 1) { + + if (pSession->GetStage() == 1) { // result form here HXML commandNode = pInfo->GetChildNode(); HXML xNode = xmlGetChildByTag(commandNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); -- cgit v1.2.3