diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-11 14:01:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-11 14:01:25 +0000 |
commit | 773421e8ba17637d994088c393d406226b516a30 (patch) | |
tree | 130c0bf529e30f493ae4f2abbe1230d31fecdeed /protocols/WhatsApp/src/proto.cpp | |
parent | 3fc8b6f686262e8a595fc10b2bd947526ca77bdc (diff) |
- m_hNetlibUser moved to PROTO_INTERFACE;
- unified protocol loggers
git-svn-id: http://svn.miranda-ng.org/main/trunk@6435 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/proto.cpp')
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index b362c7a059..936248b082 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -90,7 +90,7 @@ DWORD_PTR WhatsAppProto::GetCaps( int type, HANDLE hContact ) int WhatsAppProto::SetStatus( int new_status )
{
- LOG("===== Beginning SetStatus process");
+ debugLogA("===== Beginning SetStatus process");
// Routing statuses not supported by WhatsApp
switch ( new_status )
@@ -119,13 +119,13 @@ int WhatsAppProto::SetStatus( int new_status ) if (m_iStatus == ID_STATUS_CONNECTING)
{
- LOG("===== Status is connecting, no change");
+ debugLogA("===== Status is connecting, no change");
return 0;
}
if (m_iStatus == m_iDesiredStatus)
{
- LOG("===== Statuses are same, no change");
+ debugLogA("===== Statuses are same, no change");
return 0;
}
@@ -227,7 +227,7 @@ string WhatsAppProto::Register(int state, string cc, string number, string code) return ret;
}
- LOG("Server response: %s", pnlhr->pData);
+ debugLogA("Server response: %s", pnlhr->pData);
MessageBoxA(NULL, pnlhr->pData, "Debug", MB_OK);
JSONROOT resp(pnlhr->pData);
@@ -284,7 +284,7 @@ INT_PTR WhatsAppProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam) int WhatsAppProto::RefreshBuddyList(WPARAM, LPARAM )
{
- LOG("");
+ debugLogA("");
if (!isOffline())
{
//ForkThread(
@@ -316,28 +316,6 @@ std::tstring WhatsAppProto::GetAvatarFolder() return def_avatar_folder_;
}
-int WhatsAppProto::Log(const char* fn, const char *fmt,...)
-{
-#if !defined(_DEBUG)
- if (!getByte(WHATSAPP_KEY_LOGGING_ENABLE, 0))
- return EXIT_SUCCESS;
-#endif
-
- va_list va;
- char text[65535];
- ScopedLock s(log_lock_);
-
- va_start(va,fmt);
- mir_vsnprintf(text,sizeof(text),fmt,va);
- va_end(va);
-
- // Write into network log
- //CallService(MS_NETLIB_LOG, (WPARAM)m_hNetlibUser, (LPARAM)text);
-
- // Write into log file
- return utils::debug::log(m_szModuleName, std::string(fn).append(" - ").append(text));
-}
-
LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
|