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/connection.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/connection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/connection.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index d7cfd7c93e..9aae55ac32 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -33,7 +33,7 @@ void WhatsAppProto::ChangeStatus(void*) {
SetEvent(update_loop_lock_);
this->conn->forceShutdown();
- LOG("Forced shutdown");
+ debugLogA("Forced shutdown");
}
}
}
@@ -128,7 +128,7 @@ void WhatsAppProto::stayConnectedLoop(void*) desiredStatus = this->m_iDesiredStatus;
if (desiredStatus == ID_STATUS_OFFLINE || error)
{
- LOG("Set status to offline");
+ debugLogA("Set status to offline");
SetAllContactStatuses( ID_STATUS_OFFLINE, true );
this->ToggleStatusMenuItems(false);
int prevStatus = this->m_iStatus;
@@ -137,7 +137,7 @@ void WhatsAppProto::stayConnectedLoop(void*) break;
}
- LOG("Connecting...");
+ debugLogA("Connecting...");
this->m_iStatus = ID_STATUS_CONNECTING;
ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) ID_STATUS_OFFLINE, m_iStatus);
@@ -167,7 +167,7 @@ void WhatsAppProto::stayConnectedLoop(void*) connection->sendAvailableForChat();
}
- LOG("Set status to online");
+ debugLogA("Set status to online");
this->m_iStatus = desiredStatus;
ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE )m_iStatus, ID_STATUS_CONNECTING);
this->ToggleStatusMenuItems(true);
@@ -181,7 +181,7 @@ void WhatsAppProto::stayConnectedLoop(void*) this->lastPongTime = time(NULL);
cont = connection->read();
}
- LOG("Exit from read-loop");
+ debugLogA("Exit from read-loop");
CODE_BLOCK_CATCH(WAException)
error = true;
@@ -191,7 +191,7 @@ void WhatsAppProto::stayConnectedLoop(void*) error = true;
CODE_BLOCK_END
}
- LOG("Break out from loop");
+ debugLogA("Break out from loop");
}
void WhatsAppProto::sentinelLoop(void*)
@@ -207,7 +207,7 @@ void WhatsAppProto::sentinelLoop(void*) if (quietInterval >= MAX_SILENT_INTERVAL)
{
CODE_BLOCK_TRY
- LOG("send ping");
+ debugLogA("send ping");
this->lastPongTime = time(NULL);
this->connection->sendPing();
CODE_BLOCK_CATCH(exception)
@@ -224,14 +224,14 @@ void WhatsAppProto::sentinelLoop(void*) }
}
ResetEvent(update_loop_lock_);
- LOG("Exiting sentinel loop");
+ debugLogA("Exiting sentinel loop");
}
void WhatsAppProto::onPing(const std::string& id)
{
if (this->isOnline()) {
CODE_BLOCK_TRY
- LOG("Sending pong with id %s", id.c_str());
+ debugLogA("Sending pong with id %s", id.c_str());
this->connection->sendPong(id);
CODE_BLOCK_CATCH_ALL
}
|