diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-03-01 11:43:42 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-03-01 11:43:42 +0000 |
commit | 0281a1b407d4f8568197e6a6d52165c4ff853e9f (patch) | |
tree | 3f64ed4b5f1a5a41c15ed110b3d4219b92b23f4d /protocols/JabberG/src | |
parent | bf2b6b24b123538b937b31d9fd9244a4742c15b8 (diff) |
Jabber: Fixed TCHAR Logging in DebugLog
git-svn-id: http://svn.miranda-ng.org/main/trunk@8341 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_byte.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_caps.cpp | 36 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_caps.h | 24 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_events.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iq.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iq_handlers.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 37 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_message_manager.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 20 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 16 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 25 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_userinfo.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 22 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_vcard.cpp | 23 |
17 files changed, 121 insertions, 124 deletions
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 351944ce65..4f78d7a20a 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -627,7 +627,7 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) port = (WORD)_ttoi(szPort);
replaceStrT(jbt->streamhostJID, str);
- debugLogA("bytestream_recv connecting to %S:%d", szHost, port);
+ debugLog(_T("bytestream_recv connecting to %s:%d"), szHost, port);
NETLIBOPENCONNECTION nloc = { 0 };
nloc.cbSize = sizeof(nloc);
nloc.szHost = mir_t2a(szHost);
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 2ad1ce9786..4dde4c8864 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -32,7 +32,7 @@ const JabberFeatCapPair g_JabberFeatCapPairs[] = { { JABBER_FEAT_DISCO_INFO, JABBER_CAPS_DISCO_INFO, LPGENT("Supports Service Discovery info") },
{ JABBER_FEAT_DISCO_ITEMS, JABBER_CAPS_DISCO_ITEMS, LPGENT("Supports Service Discovery items list") },
{ JABBER_FEAT_ENTITY_CAPS, JABBER_CAPS_ENTITY_CAPS, LPGENT("Can inform about its Jabber capabilities") },
- { JABBER_FEAT_SI, JABBER_CAPS_SI, LPGENT("Supports stream initiation (for filetransfers for ex.)") },
+ { JABBER_FEAT_SI, JABBER_CAPS_SI, LPGENT("Supports stream initiation (e.g., for filetransfers)") },
{ JABBER_FEAT_SI_FT, JABBER_CAPS_SI_FT, LPGENT("Supports stream initiation for file transfers") },
{ JABBER_FEAT_BYTESTREAMS, JABBER_CAPS_BYTESTREAMS, LPGENT("Supports file transfers via SOCKS5 Bytestreams") },
{ JABBER_FEAT_IBB, JABBER_CAPS_IBB, LPGENT("Supports file transfers via In-Band Bytestreams") },
@@ -65,7 +65,7 @@ const JabberFeatCapPair g_JabberFeatCapPairs[] = { { JABBER_FEAT_MESSAGE_RECEIPTS, JABBER_CAPS_MESSAGE_RECEIPTS, LPGENT("Supports Message Receipts") },
{ JABBER_FEAT_USER_TUNE, JABBER_CAPS_USER_TUNE, LPGENT("Can report information about the music to which a user is listening") },
{ JABBER_FEAT_USER_TUNE_NOTIFY, JABBER_CAPS_USER_TUNE_NOTIFY, LPGENT("Receives information about the music to which a user is listening") },
- { JABBER_FEAT_PRIVATE_STORAGE, JABBER_CAPS_PRIVATE_STORAGE, LPGENT("Supports private XML Storage (for bookmakrs and other)") },
+ { JABBER_FEAT_PRIVATE_STORAGE, JABBER_CAPS_PRIVATE_STORAGE, LPGENT("Supports private XML Storage (for bookmarks and other)") },
{ JABBER_FEAT_ATTENTION, JABBER_CAPS_ATTENTION, LPGENT("Supports attention requests ('nudge')") },
{ JABBER_FEAT_ARCHIVE_AUTO, JABBER_CAPS_ARCHIVE_AUTO, LPGENT("Supports chat history retrieving") },
{ JABBER_FEAT_ARCHIVE_MANAGE, JABBER_CAPS_ARCHIVE_MANAGE, LPGENT("Supports chat history management") },
@@ -79,20 +79,20 @@ const JabberFeatCapPair g_JabberFeatCapPairs[] = { };
const JabberFeatCapPairExt g_JabberFeatCapPairsExt[] = {
- { _T(JABBER_EXT_SECUREIM), JABBER_CAPS_SECUREIM, "SecureIM/IsContactSecured" },
- { _T(JABBER_EXT_MIROTR), JABBER_CAPS_MIROTR, "MirOTRMenuCheckService" },
- { _T(JABBER_EXT_NEWGPG), JABBER_CAPS_NEWGPG, "/ExportGPGKeys" },
- { _T(JABBER_EXT_NUDGE), JABBER_CAPS_ATTENTION, "NUDGE/Send" },
- { _T(JABBER_EXT_JINGLE), JABBER_CAPS_JINGLE, "Jingle/StartSession" },
- { _T(JABBER_EXT_COMMANDS), JABBER_CAPS_COMMANDS },
- { _T(JABBER_EXT_USER_ACTIVITY), JABBER_CAPS_USER_ACTIVITY_NOTIFY },
- { _T(JABBER_EXT_USER_MOOD), JABBER_CAPS_USER_MOOD_NOTIFY },
- { _T(JABBER_EXT_USER_TUNE), JABBER_CAPS_USER_TUNE_NOTIFY, "ListeningTo/Enabled" },
- { _T(JABBER_EXT_USER_TUNE), JABBER_CAPS_USER_TUNE_NOTIFY, "WATrack/GetFileInfo" },
- { _T(JABBER_EXT_MIR_NOTES), JABBER_CAPS_MIRANDA_NOTES },
+ { JABBER_EXT_SECUREIM, JABBER_CAPS_SECUREIM, "SecureIM/IsContactSecured" },
+ { JABBER_EXT_MIROTR, JABBER_CAPS_MIROTR, "MirOTRMenuCheckService" },
+ { JABBER_EXT_NEWGPG, JABBER_CAPS_NEWGPG, "/ExportGPGKeys" },
+ { JABBER_EXT_NUDGE, JABBER_CAPS_ATTENTION, "NUDGE/Send" },
+ { JABBER_EXT_JINGLE, JABBER_CAPS_JINGLE, "Jingle/StartSession" },
+ { JABBER_EXT_COMMANDS, JABBER_CAPS_COMMANDS },
+ { JABBER_EXT_USER_ACTIVITY, JABBER_CAPS_USER_ACTIVITY_NOTIFY },
+ { JABBER_EXT_USER_MOOD, JABBER_CAPS_USER_MOOD_NOTIFY },
+ { JABBER_EXT_USER_TUNE, JABBER_CAPS_USER_TUNE_NOTIFY, "ListeningTo/Enabled" },
+ { JABBER_EXT_USER_TUNE, JABBER_CAPS_USER_TUNE_NOTIFY, "WATrack/GetFileInfo" },
+ { JABBER_EXT_MIR_NOTES, JABBER_CAPS_MIRANDA_NOTES },
{ szCoreVersion, JABBER_CAPS_MIRANDA_PARTIAL },
- { _T(JABBER_EXT_PLATFORMX86), JABBER_CAPS_PLATFORMX86 },
- { _T(JABBER_EXT_PLATFORMX64), JABBER_CAPS_PLATFORMX64 },
+ { JABBER_EXT_PLATFORMX86, JABBER_CAPS_PLATFORMX86 },
+ { JABBER_EXT_PLATFORMX64, JABBER_CAPS_PLATFORMX64 },
{ NULL }
};
@@ -560,12 +560,12 @@ JabberCapsBits CJabberClientCapsManager::GetClientCaps(TCHAR *szNode, TCHAR *szV CJabberClientCaps *pClient = FindClient(szNode);
if (!pClient) {
Unlock();
- ppro->debugLogA("CAPS: get no caps for: %S, %S", szNode, szVer);
+ ppro->debugLog(_T("CAPS: get no caps for: %s, %s"), szNode, szVer);
return JABBER_RESOURCE_CAPS_UNINIT;
}
JabberCapsBits jcbCaps = pClient->GetPartialCaps(szVer);
Unlock();
- ppro->debugLogA("CAPS: get caps %I64x for: %S, %S", jcbCaps, szNode, szVer);
+ ppro->debugLog(_T("CAPS: get caps %I64x for: %s, %s"), jcbCaps, szNode, szVer);
return jcbCaps;
}
@@ -584,7 +584,7 @@ BOOL CJabberClientCapsManager::SetClientCaps(const TCHAR *szNode, const TCHAR *s }
BOOL bOk = pClient->SetPartialCaps(szVer, jcbCaps, nIqId);
Unlock();
- ppro->debugLogA("CAPS: set caps %I64x for: %S, %S", jcbCaps, szNode, szVer);
+ ppro->debugLog(_T("CAPS: set caps %I64x for: %s, %s"), jcbCaps, szNode, szVer);
return bOk;
}
diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index b2d6e315db..54417da858 100644 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -166,18 +166,18 @@ typedef unsigned __int64 JabberCapsBits; JABBER_CAPS_USER_MOOD_NOTIFY | JABBER_CAPS_USER_TUNE_NOTIFY | JABBER_CAPS_USER_ACTIVITY_NOTIFY | JABBER_CAPS_PLATFORMX86 | JABBER_CAPS_PLATFORMX64)
-#define JABBER_EXT_SECUREIM "secureim"
-#define JABBER_EXT_MIROTR "mirotr"
-#define JABBER_EXT_JINGLE "jingle"
-#define JABBER_EXT_NEWGPG "new_gpg"
-#define JABBER_EXT_NUDGE "nudge"
-#define JABBER_EXT_COMMANDS "cmds"
-#define JABBER_EXT_USER_MOOD "mood"
-#define JABBER_EXT_USER_TUNE "tune"
-#define JABBER_EXT_USER_ACTIVITY "activity"
-#define JABBER_EXT_MIR_NOTES "mir_notes"
-#define JABBER_EXT_PLATFORMX86 "x86"
-#define JABBER_EXT_PLATFORMX64 "x64"
+#define JABBER_EXT_SECUREIM _T("secureim")
+#define JABBER_EXT_MIROTR _T("mirotr")
+#define JABBER_EXT_JINGLE _T("jingle")
+#define JABBER_EXT_NEWGPG _T("new_gpg")
+#define JABBER_EXT_NUDGE _T("nudge")
+#define JABBER_EXT_COMMANDS _T("cmds")
+#define JABBER_EXT_USER_MOOD _T("mood")
+#define JABBER_EXT_USER_TUNE _T("tune")
+#define JABBER_EXT_USER_ACTIVITY _T("activity")
+#define JABBER_EXT_MIR_NOTES _T("mir_notes")
+#define JABBER_EXT_PLATFORMX86 _T("x86")
+#define JABBER_EXT_PLATFORMX64 _T("x64")
#define JABBER_FEAT_EXT_ADDRESSING _T("http://jabber.org/protocol/address")
#define JABBER_FEAT_NESTED_ROSTER_GROUPS _T("roster:delimiter")
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 86bb7689f0..6d53a81005 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -97,7 +97,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hC else {
TCHAR *p = sttSettingToTchar(cws);
if (cws->value.pszVal != NULL && lstrcmp(p, item->group)) {
- debugLogA("Group set to %S", p);
+ debugLog(_T("Group set to %s"), p);
if (p)
AddContactToRoster(item->jid, tszNick, p);
}
@@ -120,7 +120,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT ptrT newNick( sttSettingToTchar(cws));
if (newNick && lstrcmp(item->nick, newNick)) {
- debugLogA("Renaming contact %S: %S -> %S", item->jid, item->nick, newNick);
+ debugLog(_T("Renaming contact %s: %s -> %s"), item->jid, item->nick, newNick);
AddContactToRoster(item->jid, newNick, item->group);
}
}
@@ -134,7 +134,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT if (jid == NULL)
return;
- debugLogA("Add %S permanently to list", jid);
+ debugLog(_T("Add %s permanently to list"), jid);
ptrT nick(db_get_tsa(hContact, "CList", "MyHandle"));
if (nick == NULL)
nick = getTStringA(hContact, "Nick");
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 92d9019b32..1594f0e574 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -395,11 +395,11 @@ int CJabberProto::FileSendParse(JABBER_SOCKET s, filetransfer *ft, char* buffer, if (ft->httpPath == NULL)
debugLogA("Requested file name does not matched (httpPath == NULL)");
else
- debugLogA("Requested file name does not matched ('%s' vs. '%s')", ft->httpPath, t);
+ debugLog(_T("Requested file name does not matched ('%s' vs. '%s')"), ft->httpPath, t);
ft->state = FT_ERROR;
break;
}
- debugLogA("Sending [%s]", ft->std.ptszFiles[ currentFile ]);
+ debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ currentFile ]);
_tstati64(ft->std.ptszFiles[ currentFile ], &statbuf); // file size in statbuf.st_size
if ((fileId = _topen(ft->std.ptszFiles[currentFile], _O_BINARY|_O_RDONLY)) < 0) {
debugLogA("File cannot be opened");
@@ -517,12 +517,12 @@ int filetransfer::create() WaitForSingleObject(hWaitEvent, INFINITE);
if (fileId == -1) {
- ppro->debugLogA("Saving to [%S]", std.tszCurrentFile);
+ ppro->debugLog(_T("Saving to [%s]"), std.tszCurrentFile);
fileId = _topen(std.tszCurrentFile, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE);
}
if (fileId == -1)
- ppro->debugLogA("Cannot create file '%S' during a file transfer", filefull);
+ ppro->debugLog(_T("Cannot create file '%s' during a file transfer"), filefull);
else if (std.currentFileSize != 0)
_chsize(fileId, std.currentFileSize);
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index bd22179228..a9a897831b 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -181,10 +181,10 @@ BOOL CJabberProto::FtSend(HANDLE hConn, filetransfer *ft) char* buffer;
int numRead;
- debugLogA("Sending [%s]", ft->std.ptszFiles[ft->std.currentFileNumber]);
+ debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ft->std.currentFileNumber]);
_tstati64(ft->std.ptszFiles[ft->std.currentFileNumber], &statbuf); // file size in statbuf.st_size
if ((fd = _topen(ft->std.ptszFiles[ft->std.currentFileNumber], _O_BINARY|_O_RDONLY)) < 0) {
- debugLogA("File cannot be opened");
+ debugLog(_T("File cannot be opened"));
return FALSE;
}
@@ -211,7 +211,7 @@ BOOL CJabberProto::FtSend(HANDLE hConn, filetransfer *ft) BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft)
{
- debugLogA("Sending [%s]", ft->std.ptszFiles[ft->std.currentFileNumber]);
+ debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ft->std.currentFileNumber]);
struct _stati64 statbuf;
_tstati64(ft->std.ptszFiles[ft->std.currentFileNumber], &statbuf); // file size in statbuf.st_size
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index 960f6bdf5a..7186ffe268 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -176,7 +176,7 @@ void CJabberIqManager::ExpireInfo(CJabberIqInfo *pInfo, void*) if ((pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (pInfo->m_szFrom))
pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom , 3);
- ppro->debugLogA("Expiring iq id %d, sent to %S", pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server"));
+ ppro->debugLog(_T("Expiring iq id %d, sent to %s"), pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server"));
pInfo->m_nIqType = JABBER_IQ_TYPE_FAIL;
(ppro->*(pInfo->m_pHandler))(NULL, pInfo);
@@ -346,7 +346,7 @@ BOOL CJabberIqManager::HandleIqPermanent(HXML pNode) if ((pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (iqInfo.m_szFrom))
iqInfo.m_hContact = ppro->HContactFromJID(iqInfo.m_szFrom, 3);
- ppro->debugLogA("Handling iq id %S, type %S, from %S", iqInfo.m_szId, szType, iqInfo.m_szFrom);
+ ppro->debugLog(_T("Handling iq id %s, type %s, from %s"), iqInfo.m_szId, szType, iqInfo.m_szFrom);
if ((ppro->*(pInfo->m_pHandler))(pNode, &iqInfo))
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index da5e389234..10382979fc 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -519,7 +519,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) // invalid JID
if (!bRetVal) {
- debugLogA("<iq/> attempt to hack via roster push from %S", pInfo->GetFrom());
+ debugLog(_T("<iq/> attempt to hack via roster push from %s"), pInfo->GetFrom());
return TRUE;
}
}
@@ -592,7 +592,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) else if (!_tcscmp(str, _T("to"))) item->subscription = SUB_TO;
else if (!_tcscmp(str, _T("from"))) item->subscription = SUB_FROM;
else item->subscription = SUB_NONE;
- debugLogA("Roster push for jid=%S, set subscription to %S", jid, str);
+ debugLog(_T("Roster push for jid=%s, set subscription to %s"), jid, str);
// subscription = remove is to remove from roster list
// but we will just set the contact to offline and not actually
// remove, so that history will be retained.
@@ -669,7 +669,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) desc = (TCHAR*)xmlGetText(n);
TCHAR *str2;
- debugLogA("description = %s", desc);
+ debugLog(_T("description = %s"), desc);
if ((str2 = _tcsrchr(ft->httpPath, '/')) != NULL)
str2++;
else
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 5421d2f45e..988ca2246e 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -287,9 +287,9 @@ void CJabberProto::OnIqResultBind(HXML iqNode, CJabberIqInfo *pInfo) LPCTSTR szJid = XPathT(iqNode, "bind[@xmlns='urn:ietf:params:xml:ns:xmpp-bind']/jid");
if (szJid) {
if (!_tcsncmp(m_ThreadInfo->fullJID, szJid, SIZEOF(m_ThreadInfo->fullJID)))
- debugLogA("Result Bind: %S confirmed ", m_ThreadInfo->fullJID);
+ debugLog(_T("Result Bind: %s confirmed "), m_ThreadInfo->fullJID);
else {
- debugLogA("Result Bind: %S changed to %S", m_ThreadInfo->fullJID, szJid);
+ debugLog(_T("Result Bind: %s changed to %s"), m_ThreadInfo->fullJID, szJid);
_tcsncpy(m_ThreadInfo->fullJID, szJid, SIZEOF(m_ThreadInfo->fullJID));
}
}
@@ -500,7 +500,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) MCONTACT hNext = db_find_next(hContact, m_szModuleName);
ptrT jid( getTStringA(hContact, "jid"));
if (jid != NULL && !ListGetItemPtr(LIST_ROSTER, jid)) {
- debugLogA("Syncing roster: preparing to delete %S (hContact=0x%x)", jid, hContact);
+ debugLog(_T("Syncing roster: preparing to delete %s (hContact=0x%x)"), jid, hContact);
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
hContact = hNext;
@@ -606,7 +606,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hC TCHAR szAvatarFileName[MAX_PATH];
GetAvatarFileName(hContact, szAvatarFileName, SIZEOF(szAvatarFileName));
- debugLogA("Picture file name set to %S", szAvatarFileName);
+ debugLog(_T("Picture file name set to %s"), szAvatarFileName);
HANDLE hFile = CreateFile(szAvatarFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
return;
@@ -623,7 +623,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hC hasPhoto = TRUE;
CallService(MS_AV_SETMYAVATART, (WPARAM)m_szModuleName, (LPARAM)szAvatarFileName);
- debugLogA("My picture saved to %S", szAvatarFileName);
+ debugLog(_T("My picture saved to %s"), szAvatarFileName);
}
else {
ptrT jid(getTStringA(hContact, "jid"));
@@ -638,7 +638,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hC if (item->photoFileName && _tcscmp(item->photoFileName, szAvatarFileName))
DeleteFile(item->photoFileName);
replaceStrT(item->photoFileName, szAvatarFileName);
- debugLogA("Contact's picture saved to %S", szAvatarFileName);
+ debugLog(_T("Contact's picture saved to %s"), szAvatarFileName);
OnIqResultGotAvatar(hContact, o, szPicType);
}
}
@@ -1165,7 +1165,7 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) _tcsncpy(jsr.jid, jid, SIZEOF(jsr.jid));
jsr.jid[SIZEOF(jsr.jid) - 1] = '\0';
jsr.hdr.id = (TCHAR*)jid;
- debugLogA("Result jid = %S", jid);
+ debugLog(_T("Result jid = %s"), jid);
if ((n = xmlGetChild(itemNode, "nick")) != NULL && xmlGetText(n) != NULL)
jsr.hdr.nick = (TCHAR*)xmlGetText(n);
else
@@ -1197,12 +1197,15 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*)
{
HXML queryNode;
- const TCHAR *type;
- int id;
debugLogA("<iq/> iqIdGetExtSearch");
- if ((type=xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if ((id = JabberGetPacketID(iqNode)) == -1) return;
+ const TCHAR *type = xmlGetAttrValue(iqNode, _T("type"));
+ if (type == NULL)
+ return;
+
+ int id = JabberGetPacketID(iqNode);
+ if (id == -1)
+ return;
if (!lstrcmp(type, _T("result"))) {
if ((queryNode=xmlGetChild(iqNode , "query")) == NULL) return;
@@ -1237,7 +1240,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (!lstrcmp(fieldName, _T("jid"))) {
_tcsncpy(jsr.jid, xmlGetText(n), SIZEOF(jsr.jid));
jsr.jid[SIZEOF(jsr.jid)-1] = '\0';
- debugLogA("Result jid = %S", jsr.jid);
+ debugLog(_T("Result jid = %s"), jsr.jid);
}
else if (!lstrcmp(fieldName, _T("nickname")))
jsr.hdr.nick = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
@@ -1411,7 +1414,7 @@ void CJabberProto::OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *m else if (!lstrcmp(mimeType, _T("image/bmp"))) pictureType = PA_FORMAT_BMP;
else {
LBL_ErrFormat:
- debugLogA("Invalid mime type specified for picture: %S", mimeType);
+ debugLog(_T("Invalid mime type specified for picture: %s"), mimeType);
return;
}
}
@@ -1448,7 +1451,7 @@ LBL_ErrFormat: char buffer[41];
setString(hContact, "AvatarSaved", bin2hex(digest, sizeof(digest), buffer));
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&AI), NULL);
- debugLogA("Broadcast new avatar: %s",AI.filename);
+ debugLog(_T("Broadcast new avatar: %s"),AI.filename);
}
else ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, HANDLE(&AI), NULL);
}
@@ -1458,14 +1461,14 @@ LBL_ErrFormat: void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo *pInfo)
{
- const TCHAR *type, *jid;
-
// RECVED: list of bookmarks
// ACTION: refresh bookmarks dialog
debugLogA("<iq/> iqIdGetBookmarks");
- if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL)
+ const TCHAR *type = xmlGetAttrValue(iqNode, _T("type"));
+ if (type == NULL)
return;
+ const TCHAR *jid;
if (!lstrcmp(type, _T("result"))) {
if (m_ThreadInfo && !(m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)) {
m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PRIVATE_STORAGE;
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index b0c7a9d9a4..baaf3c4dc1 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -106,7 +106,7 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea messageInfo.m_hContact = ppro->HContactFromJID(messageInfo.m_szFrom, 3);
if (messageInfo.m_szFrom)
- ppro->debugLogA("Handling message from %S", messageInfo.m_szFrom);
+ ppro->debugLog(_T("Handling message from %s"), messageInfo.m_szFrom);
if ((ppro->*(pInfo->m_pHandler))(node, pThreadData, &messageInfo))
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index e3b56f08b5..adb34e8061 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -139,7 +139,7 @@ MCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL db_set_b(hNewContact, "CList", "NotOnList", 1);
else
SendGetVcard(s);
- debugLogA("Create Jabber contact jid=%S, nick=%S", s, nick);
+ debugLog(_T("Create Jabber contact jid=%s, nick=%s"), s, nick);
DBCheckIsTransportedContact(s,hNewContact);
return hNewContact;
}
@@ -324,7 +324,7 @@ void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item) if (!hContact)
return;
- debugLogA("JabberUpdateMirVer: for jid %S", item->jid);
+ debugLog(_T("JabberUpdateMirVer: for jid %s"), item->jid);
pResourceStatus p(NULL);
if (item->resourceMode == RSMODE_LASTSEEN)
@@ -344,7 +344,7 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) // jabber:iq:version info requested and exists?
if (resource->m_dwVersionRequestTime && resource->m_tszSoftware) {
- debugLogA("JabberUpdateMirVer: for iq:version rc %S: %S", resource->m_tszResourceName, resource->m_tszSoftware);
+ debugLog(_T("JabberUpdateMirVer: for iq:version rc %s: %s"), resource->m_tszResourceName, resource->m_tszSoftware);
if (!resource->m_tszSoftwareVersion || _tcsstr(resource->m_tszSoftware, resource->m_tszSoftwareVersion))
res = resource->m_tszSoftware;
else
@@ -352,13 +352,13 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) }
// no version info and no caps info? set MirVer = resource name
else if (!resource->m_tszCapsNode || !resource->m_tszCapsVer) {
- debugLogA("JabberUpdateMirVer: for rc %S: %S", resource->m_tszResourceName, resource->m_tszResourceName);
+ debugLog(_T("JabberUpdateMirVer: for rc %s: %s"), resource->m_tszResourceName, resource->m_tszResourceName);
if (resource->m_tszResourceName)
res = resource->m_tszResourceName;
}
// XEP-0115 caps mode
else {
- debugLogA("JabberUpdateMirVer: for rc %S: %S#%S", resource->m_tszResourceName, resource->m_tszCapsNode, resource->m_tszCapsVer);
+ debugLog(_T("JabberUpdateMirVer: for rc %s: %s#%s"), resource->m_tszResourceName, resource->m_tszCapsNode, resource->m_tszCapsVer);
int i;
@@ -375,19 +375,19 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) }
// attach additional info for fingerprint plguin
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, _T(JABBER_EXT_PLATFORMX86)) && !_tcsstr(res, _T("x86")))
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX86) && !_tcsstr(res, _T("x86")))
res.Append(_T(" x86"));
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, _T(JABBER_EXT_PLATFORMX64)) && !_tcsstr(res, _T("x64")))
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX64) && !_tcsstr(res, _T("x64")))
res.Append(_T(" x64"));
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, _T(JABBER_EXT_SECUREIM)) && !_tcsstr(res, _T("(SecureIM)")))
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_SECUREIM) && !_tcsstr(res, _T("(SecureIM)")))
res.Append(_T(" (SecureIM)"));
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, _T(JABBER_EXT_MIROTR)) && !_tcsstr(res, _T("(MirOTR)")))
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_MIROTR) && !_tcsstr(res, _T("(MirOTR)")))
res.Append(_T(" (MirOTR)"));
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, _T(JABBER_EXT_NEWGPG)) && !_tcsstr(res, _T("(New_GPG)")))
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_NEWGPG) && !_tcsstr(res, _T("(New_GPG)")))
res.Append(_T(" (New_GPG)"));
if (resource->m_tszResourceName && !_tcsstr(res, resource->m_tszResourceName))
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 1b52532d08..5e63f0f40b 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -319,12 +319,12 @@ MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) MCONTACT hContact;
TCHAR *jid, *nick;
- debugLogA("AddToListByJID jid = %S", newJid);
+ debugLog(_T("AddToListByJID jid = %s"), newJid);
if ((hContact=HContactFromJID(newJid)) == NULL) {
// not already there: add
jid = mir_tstrdup(newJid);
- debugLogA("Add new jid to contact jid = %S", jid);
+ debugLog(_T("Add new jid to contact jid = %s"), jid);
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
setTString(hContact, "jid", jid);
@@ -428,7 +428,7 @@ int CJabberProto::Authorize(HANDLE hDbEvent) char *lastName = firstName + strlen(firstName) + 1;
char *jid = lastName + strlen(lastName) + 1;
- debugLogA("Send 'authorization allowed' to %S", jid);
+ debugLog(_T("Send 'authorization allowed' to %s"), jid);
TCHAR *newJid = (dbei.flags & DBEF_UTF) ? mir_utf8decodeT(jid) : mir_a2t(jid);
@@ -439,7 +439,7 @@ int CJabberProto::Authorize(HANDLE hDbEvent) JABBER_LIST_ITEM *item;
if ((item = ListGetItemPtr(LIST_ROSTER, newJid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
- debugLogA("Try adding contact automatically jid = %S", jid);
+ debugLog(_T("Try adding contact automatically jid = %s"), jid);
if (MCONTACT hContact = AddToListByJID(newJid, 0)) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
@@ -749,7 +749,7 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid)
{
- debugLogA("JabberBasicSearch called with lParam = '%s'", szJid);
+ debugLog(_T("JabberBasicSearch called with lParam = '%s'"), szJid);
JABBER_SEARCH_BASIC *jsb;
if (!m_bJabberOnline || (jsb = (JABBER_SEARCH_BASIC*)mir_alloc(sizeof(JABBER_SEARCH_BASIC))) == NULL)
@@ -778,7 +778,7 @@ HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) }
else _tcsncpy(jsb->jid, szJid, SIZEOF(jsb->jid));
- debugLogA("Adding '%s' without validation", jsb->jid);
+ debugLog(_T("Adding '%s' without validation"), jsb->jid);
jsb->hSearch = SerialNext();
ForkThread((MyThreadFunc)&CJabberProto::BasicSearchThread, jsb);
return (HANDLE)jsb->hSearch;
@@ -973,7 +973,7 @@ HANDLE __cdecl CJabberProto::SendFile(MCONTACT hContact, const TCHAR *szDescript ft->fileSize = (unsigned __int64*)mir_calloc(sizeof(unsigned __int64)* ft->std.totalFiles);
for (i = j = 0; i < ft->std.totalFiles; i++) {
if (_tstati64(ppszFiles[i], &statbuf))
- debugLogA("'%s' is an invalid filename", ppszFiles[i]);
+ debugLog(_T("'%s' is an invalid filename"), ppszFiles[i]);
else {
ft->std.ptszFiles[j] = mir_tstrdup(ppszFiles[i]);
ft->fileSize[j] = statbuf.st_size;
@@ -1285,7 +1285,7 @@ int __cdecl CJabberProto::RecvAwayMsg(MCONTACT, int /*statusMode*/, PROTORECVEVE int __cdecl CJabberProto::SetAwayMsg(int status, const TCHAR *msg)
{
- debugLogA("SetAwayMsg called, wParam=%d lParam=%S", status, msg);
+ debugLog(_T("SetAwayMsg called, wParam=%d lParam=%s"), status, msg);
TCHAR **szMsg;
mir_cslockfull lck(m_csModeMsgMutex);
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 3ea38670c1..b6445cb3e3 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -158,7 +158,7 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (szJid[0] == 0)
_tcsncpy_s(szJid, SIZEOF(szJid), tszJid, _TRUNCATE);
- debugLogA("Rereading %s for %S", isXVcard ? JABBER_FEAT_VCARD_TEMP : JABBER_FEAT_AVATAR, szJid);
+ debugLog(_T("Rereading %s for %s"), isXVcard ? JABBER_FEAT_VCARD_TEMP : JABBER_FEAT_AVATAR, szJid);
m_ThreadInfo->send((isXVcard) ?
XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP) :
@@ -350,7 +350,7 @@ static void appendString(bool bIsTipper, const TCHAR *tszTitle, const TCHAR *tsz bufSize -= len;
if (bIsTipper)
- mir_sntprintf(buf, bufSize, _T("<b>%s</b>%s\t"), TranslateTS(tszTitle), tszValue);
+ mir_sntprintf(buf, bufSize, _T("<b>%s</b>\t%s"), TranslateTS(tszTitle), tszValue);
else {
TCHAR *p = TranslateTS(tszTitle);
mir_sntprintf(buf, bufSize, _T("%s%s\t%s"), p, _tcslen(p)<=7 ? _T("\t") : _T(""), tszValue);
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 6bb48491c3..d502cfee54 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -884,7 +884,7 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData* info) xmlStreamInitialize("after successful sasl");
}
- else debugLogA("Success: unknown action %S.",type);
+ else debugLog(_T("Success: unknown action %s."),type);
}
void CJabberProto::OnProcessChallenge(HXML node, ThreadData* info)
@@ -966,11 +966,10 @@ void CJabberProto::OnProcessProceed(HXML node, ThreadData* info) void CJabberProto::OnProcessCompressed(HXML node, ThreadData* info)
{
- const TCHAR *type;
-
debugLogA("Compression confirmed");
- if ((type = xmlGetAttrValue(node, _T("xmlns"))) != NULL && !lstrcmp(type, _T("error")))
+ const TCHAR *type = xmlGetAttrValue(node, _T("xmlns"));
+ if (type != NULL && !lstrcmp(type, _T("error")))
return;
if (lstrcmp(type, _T("http://jabber.org/protocol/compress")))
return;
@@ -1445,7 +1444,7 @@ void CJabberProto::OnProcessPresenceCapabilites(HXML node) if (from == NULL)
return;
- debugLogA("presence: for jid %S", from);
+ debugLog(_T("presence: for jid %s"), from);
pResourceStatus r(ResourceInfoFromJID(from));
if (r == NULL)
@@ -1510,7 +1509,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) item->getTemp()->m_iStatus = status;
if (nSelectedResource != -1) {
pResourceStatus r(item->arResources[nSelectedResource]);
- debugLogA("JabberUpdateJidDbSettings: updating jid %S to rc %S", item->jid, r->m_tszResourceName);
+ debugLog(_T("JabberUpdateJidDbSettings: updating jid %s to rc %s"), item->jid, r->m_tszResourceName);
if (r->m_tszStatusMessage)
db_set_ts(hContact, "CList", "StatusMsg", r->m_tszStatusMessage);
else
@@ -1568,14 +1567,14 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData* info) if ((hContact = HContactFromJID(from)) == NULL) {
if (!_tcsicmp(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) {
- debugLogA("SKIP Receive presence online from %S (who is not in my roster and not in list - skiping)", from);
+ debugLog(_T("SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)"), from);
mir_free(nick);
return;
}
hContact = DBCreateContact(from, nick, TRUE, TRUE);
}
if (!ListGetItemPtr(LIST_ROSTER, from)) {
- debugLogA("Receive presence online from %S (who is not in my roster)", from);
+ debugLog(_T("Receive presence online from %s (who is not in my roster)"), from);
ListAdd(LIST_ROSTER, from);
}
DBCheckIsTransportedContact(from, hContact);
@@ -1603,7 +1602,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData* info) if (_tcschr(from, '@') == NULL) {
UI_SAFE_NOTIFY(m_pDlgServiceDiscovery, WM_JABBER_TRANSPORT_REFRESH);
}
- debugLogA("%S (%S) online, set contact status to %S", nick, from, pcli->pfnGetStatusModeDescription(status, 0));
+ debugLog(_T("%s (%s) online, set contact status to %s"), nick, from, pcli->pfnGetStatusModeDescription(status, 0));
mir_free(nick);
HXML xNode;
@@ -1679,7 +1678,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData* info) item->getTemp()->m_tszStatusMessage = mir_tstrdup(xmlGetText( xmlGetChild(node , "status")));
}
}
- else debugLogA("SKIP Receive presence offline from %S (who is not in my roster)", from);
+ else debugLog(_T("SKIP Receive presence offline from %s (who is not in my roster)"), from);
UpdateJidDbSettings(from);
@@ -1699,7 +1698,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData* info) if (xNick != NULL) {
LPCTSTR xszNick = xmlGetText(xNick);
if (xszNick != NULL && *xszNick) {
- debugLogA("Grabbed nick from presence: %S", xszNick);
+ debugLog(_T("Grabbed nick from presence: %s"), xszNick);
tszNick = mir_tstrdup(xszNick);
}
}
@@ -1711,7 +1710,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData* info) if (m_options.AutoAdd == TRUE) {
if ((item = ListGetItemPtr(LIST_ROSTER, from)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
- debugLogA("Try adding contact automatically jid = %S", from);
+ debugLog(_T("Try adding contact automatically jid = %s"), from);
if ((hContact = AddToListByJID(from, 0)) != NULL) {
setTString(hContact, "Nick", tszNick);
db_unset(hContact, "CList", "NotOnList");
@@ -1721,7 +1720,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData* info) RebuildInfoFrame();
}
else {
- debugLogA("%S (%S) requests authorization", tszNick, from);
+ debugLog(_T("%s (%s) requests authorization"), tszNick, from);
DBAddAuthRequest(from, tszNick);
}
return;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 1f9bd2a4ea..aca4c6341f 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -645,7 +645,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP item = photoInfo->ppro->ListGetItemPtr(LIST_ROSTER, jid);
if (item != NULL) {
if (item->photoFileName) {
- photoInfo->ppro->debugLogA("Showing picture from %S", item->photoFileName);
+ photoInfo->ppro->debugLog(_T("Showing picture from %s"), item->photoFileName);
photoInfo->hBitmap = (HBITMAP) CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)item->photoFileName);
FIP->FI_Premultiply(photoInfo->hBitmap);
ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_SHOW);
@@ -703,7 +703,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP ofn.nMaxFile = _MAX_PATH;
ofn.Flags = OFN_OVERWRITEPROMPT;
if ( GetSaveFileName(&ofn)) {
- photoInfo->ppro->debugLogA("File selected is %s", szFileName);
+ photoInfo->ppro->debugLog(_T("File selected is %s"), szFileName);
CopyFile(item->photoFileName, szFileName, FALSE);
}
}
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index c95147adc8..027d9b0330 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -601,33 +601,33 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const LIST<TCHAR> arrExtCaps(5);
if (bSecureIM)
- arrExtCaps.insert( _T(JABBER_EXT_SECUREIM));
+ arrExtCaps.insert(JABBER_EXT_SECUREIM);
if (bMirOTR)
- arrExtCaps.insert( _T(JABBER_EXT_MIROTR));
+ arrExtCaps.insert(JABBER_EXT_MIROTR);
if (bNewGPG)
- arrExtCaps.insert( _T(JABBER_EXT_NEWGPG));
+ arrExtCaps.insert(JABBER_EXT_NEWGPG);
if (bPlatform)
- arrExtCaps.insert( _T(JABBER_EXT_PLATFORMX64));
+ arrExtCaps.insert(JABBER_EXT_PLATFORMX64);
else
- arrExtCaps.insert( _T(JABBER_EXT_PLATFORMX86));
+ arrExtCaps.insert(JABBER_EXT_PLATFORMX86);
if (m_options.EnableRemoteControl)
- arrExtCaps.insert( _T(JABBER_EXT_COMMANDS));
+ arrExtCaps.insert(JABBER_EXT_COMMANDS);
if (m_options.EnableUserMood)
- arrExtCaps.insert( _T(JABBER_EXT_USER_MOOD));
+ arrExtCaps.insert(JABBER_EXT_USER_MOOD);
if (m_options.EnableUserTune)
- arrExtCaps.insert( _T(JABBER_EXT_USER_TUNE));
+ arrExtCaps.insert(JABBER_EXT_USER_TUNE);
if (m_options.EnableUserActivity)
- arrExtCaps.insert( _T(JABBER_EXT_USER_ACTIVITY));
+ arrExtCaps.insert(JABBER_EXT_USER_ACTIVITY);
if (m_options.AcceptNotes)
- arrExtCaps.insert( _T(JABBER_EXT_MIR_NOTES));
+ arrExtCaps.insert(JABBER_EXT_MIR_NOTES);
NotifyFastHook(hExtListInit, (WPARAM)&arrExtCaps, (LPARAM)(IJabberInterface*)this);
@@ -1137,7 +1137,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) fclose(out);
setString(AI.hContact, "AvatarSaved", buffer);
ProtoBroadcastAck(AI.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
- debugLogA("Broadcast new avatar: %s", AI.filename);
+ debugLog(_T("Broadcast new avatar: %s"), AI.filename);
}
else ProtoBroadcastAck(AI.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &AI, 0);
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index a150a6439a..259c4f25dd 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -293,16 +293,14 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (GetTempPath(SIZEOF(szTempPath), szTempPath) <= 0)
_tcscpy(szTempPath, _T(".\\"));
if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) {
- dat->ppro->debugLogA("Temp file = %S", szTempFileName);
+ dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName);
if (CopyFile(szAvatarFileName, szTempFileName, FALSE) == TRUE) {
- char* p = mir_t2a(szTempFileName);
- if ((dat->hBitmap=(HBITMAP) CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)p)) != NULL) {
+ if ((dat->hBitmap=(HBITMAP) CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)szTempFileName)) != NULL) {
FIP->FI_Premultiply(dat->hBitmap);
_tcscpy(dat->ppro->m_szPhotoFileName, szTempFileName);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE);
}
else DeleteFile(szTempFileName);
- mir_free(p);
}
else DeleteFile(szTempFileName);
} }
@@ -338,7 +336,7 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR struct _stat st;
HBITMAP hNewBitmap;
- dat->ppro->debugLogA("File selected is %S", szFileName);
+ dat->ppro->debugLog(_T("File selected is %s"), szFileName);
if (_tstat(szFileName, &st)<0 || st.st_size>40*1024) {
MessageBox(hwndDlg, TranslateT("Only JPG, GIF, and BMP image files smaller than 40 KB are supported."), TranslateT("Jabber vCard"), MB_OK|MB_SETFOREGROUND);
break;
@@ -346,7 +344,7 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (GetTempPath(SIZEOF(szTempPath), szTempPath) <= 0)
_tcscpy(szTempPath, _T(".\\"));
if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) {
- dat->ppro->debugLogA("Temp file = %S", szTempFileName);
+ dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName);
if (CopyFile(szFileName, szTempFileName, FALSE) == TRUE) {
char* pszTemp = mir_t2a(szTempFileName);
if ((hNewBitmap=(HBITMAP) CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)pszTemp)) != NULL) {
@@ -392,15 +390,12 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case WM_PAINT:
if (dat->hBitmap) {
BITMAP bm;
- HDC hdcMem;
- HWND hwndCanvas;
- HDC hdcCanvas;
POINT ptSize, ptOrg, pt, ptFitSize;
RECT rect;
- hwndCanvas = GetDlgItem(hwndDlg, IDC_CANVAS);
- hdcCanvas = GetDC(hwndCanvas);
- hdcMem = CreateCompatibleDC(hdcCanvas);
+ HWND hwndCanvas = GetDlgItem(hwndDlg, IDC_CANVAS);
+ HDC hdcCanvas = GetDC(hwndCanvas);
+ HDC hdcMem = CreateCompatibleDC(hdcCanvas);
SelectObject(hdcMem, dat->hBitmap);
SetMapMode(hdcMem, GetMapMode(hdcCanvas));
GetObject(dat->hBitmap, sizeof(BITMAP), (LPVOID) &bm);
@@ -1118,7 +1113,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) szFileName = szAvatarName;
// Set photo element, also update the global jabberVcardPhotoFileName to reflect the update
- debugLogA("Before update, file name = %S", szFileName);
+ debugLog(_T("Before update, file name = %s"), szFileName);
if (szFileName == NULL || szFileName[0] == 0) {
v << XCHILD(_T("PHOTO"));
DeleteFile(szAvatarName);
@@ -1126,7 +1121,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) delSetting("AvatarHash");
}
else {
- debugLogA("Saving picture from %S", szFileName);
+ debugLog(_T("Saving picture from %s"), szFileName);
struct _stat st;
if ( _tstat(szFileName, &st) >= 0) {
|