本文整理汇总了C++中debugLogA函数的典型用法代码示例。如果您正苦于以下问题:C++ debugLogA函数的具体用法?C++ debugLogA怎么用?C++ debugLogA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debugLogA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: debugLogA
int CVkProto::Authorize(MEVENT hDbEvent)
{
debugLogA("CVkProto::Authorize");
if (!IsOnline())
return 1;
MCONTACT hContact = MContactFromDbEvent(hDbEvent);
if (hContact == INVALID_CONTACT_ID)
return 1;
return AuthRequest(hContact, NULL);
}
示例2: debugLogA
void CIcqProto::handleAuthKeyResponse(BYTE *buf, size_t wPacketLen, serverthread_info *info)
{
char szKey[64] = {0};
mir_md5_state_t state;
BYTE digest[16];
debugLogA("Received %s", "ICQ_SIGNON_AUTH_KEY");
if (wPacketLen < 2) {
debugLogA("Malformed %s", "ICQ_SIGNON_AUTH_KEY");
icq_LogMessage(LOG_FATAL, LPGEN("Secure login failed.\nInvalid server response."));
SetCurrentStatus(ID_STATUS_OFFLINE);
return;
}
size_t wKeyLen;
unpackWord(&buf, &wKeyLen);
wPacketLen -= 2;
if (!wKeyLen || wKeyLen > wPacketLen || wKeyLen > sizeof(szKey)) {
debugLogA("Invalid length in %s: %u", "ICQ_SIGNON_AUTH_KEY", wKeyLen);
icq_LogMessage(LOG_FATAL, LPGEN("Secure login failed.\nInvalid key length."));
SetCurrentStatus(ID_STATUS_OFFLINE);
return;
}
unpackString(&buf, szKey, wKeyLen);
mir_md5_init(&state);
mir_md5_append(&state, info->szAuthKey, (int)info->wAuthKeyLen);
mir_md5_finish(&state, digest);
mir_md5_init(&state);
mir_md5_append(&state, (LPBYTE)szKey, (int)wKeyLen);
mir_md5_append(&state, digest, 16);
mir_md5_append(&state, (LPBYTE)CLIENT_MD5_STRING, sizeof(CLIENT_MD5_STRING)-1);
mir_md5_finish(&state, digest);
debugLogA("Sending ICQ_SIGNON_LOGIN_REQUEST to login server");
sendClientAuth((char*)digest, 0x10, TRUE);
}
示例3: mir_strdup
void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq)
{
CMStringA str;
do {
pReq->bNeedsRestart = false;
pReq->szUrl = pReq->m_szUrl.GetBuffer();
if (!pReq->m_szParam.IsEmpty()) {
if (pReq->requestType == REQUEST_GET) {
str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam);
pReq->szUrl = str.GetBuffer();
}
else {
pReq->pData = mir_strdup(pReq->m_szParam);
pReq->dataLength = pReq->m_szParam.GetLength();
}
}
debugLogA("CVkProto::ExecuteRequest \n====\n%s\n====\n", pReq->szUrl);
NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)pReq);
if (reply != NULL) {
if (pReq->m_pFunc != NULL)
(this->*(pReq->m_pFunc))(reply, pReq); // may be set pReq->bNeedsRestart
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)reply);
}
else if (pReq->bIsMainConn) {
if (IsStatusConnecting(m_iStatus))
ConnectionFailed(LOGINERR_NONETWORK);
else if (pReq->m_iRetry && !m_bTerminated) {
pReq->bNeedsRestart = true;
Sleep(1000); //Pause for fix err
pReq->m_iRetry--;
debugLogA("CVkProto::ExecuteRequest restarting (retry = %d)", MAX_RETRIES - pReq->m_iRetry);
}
else {
debugLogA("CVkProto::ExecuteRequest ShutdownSession");
ShutdownSession();
}
}
debugLogA("CVkProto::ExecuteRequest pReq->bNeedsRestart = %d", (int)pReq->bNeedsRestart);
} while (pReq->bNeedsRestart && !m_bTerminated);
delete pReq;
}
示例4: debugLogA
void CIcqProto::handleMigration(serverthread_info *info)
{
// Check the data that was saved when the migration was announced
debugLogA("Migrating to %s", info->newServer);
if (!info->newServer || !info->cookieData) {
icq_LogMessage(LOG_FATAL, LPGEN("You have been disconnected from the ICQ network because the current server shut down."));
SAFE_FREE(&info->newServer);
SAFE_FREE((void**)&info->cookieData);
info->isNewServerReady = info->isMigrating = false;
}
}
示例5: debugLogA
HANDLE CVkProto::SendFile(MCONTACT hContact, const TCHAR *desc, TCHAR **files)
{
debugLogA("CVkProto::SendFile");
LONG userID = getDword(hContact, "ID", -1);
if (!IsOnline() || ((userID == -1 || userID == VK_FEED_USER) && !isChatRoom(hContact)))
return (HANDLE)0;
CVkFileUploadParam *fup = new CVkFileUploadParam(hContact, desc, files);
ForkThread(&CVkProto::SendFileThread, (void *)fup);
return (HANDLE)fup;
}
示例6: readIntoTLVChain
void CIcqProto::handlePrivacyRightsReply(unsigned char *pBuffer, size_t wBufferLength)
{
if (wBufferLength >= 12) {
oscar_tlv_chain* pChain = readIntoTLVChain(&pBuffer, wBufferLength, 0);
if (pChain) {
WORD wMaxVisibleContacts = pChain->getWord(0x0001, 1);
WORD wMaxInvisibleContacts = pChain->getWord(0x0002, 1);
WORD wMaxTemporaryVisibleContacts = pChain->getWord(0x0003, 1);
disposeChain(&pChain);
debugLogA("PRIVACY: Max visible %u, max invisible %u, max temporary visible %u items.", wMaxVisibleContacts, wMaxInvisibleContacts, wMaxTemporaryVisibleContacts);
// Success
return;
}
}
// Failure
debugLogA("Warning: Malformed SRV_PRIVACY_RIGHTS_REPLY");
}
示例7: debugLogA
void CToxProto::TryConnect()
{
if (tox_self_get_connection_status(tox) != TOX_CONNECTION_NONE)
{
isConnected = true;
debugLogA(__FUNCTION__": successfuly connected to DHT");
ForkThread(&CToxProto::LoadFriendList, NULL);
m_iStatus = m_iDesiredStatus;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus);
tox_self_set_status(tox, MirandaToToxStatus(m_iStatus));
debugLogA(__FUNCTION__": changing status from %i to %i", ID_STATUS_CONNECTING, m_iDesiredStatus);
}
else if (m_iStatus++ > TOX_MAX_CONNECT_RETRIES)
{
SetStatus(ID_STATUS_OFFLINE);
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, (HANDLE)NULL, LOGINERR_NONETWORK);
debugLogA(__FUNCTION__": failed to connect to DHT");
}
}
示例8: debugLogA
void CVkProto::UnInitMenus()
{
debugLogA("CVkProto::UnInitMenus");
for (int i = 0; i < PMI_COUNT; i++)
Menu_RemoveItem(g_hProtoMenuItems[i]);
for (int i = 0; i < CHMI_COUNT; i++)
Menu_RemoveItem(g_hContactHistoryMenuItems[i]);
for (int i = 0; i < CMI_COUNT; i++)
Menu_RemoveItem(g_hContactMenuItems[i]);
}
示例9: debugLogA
void CVkProto::OnLoggedIn()
{
debugLogA("CVkProto::OnLoggedIn");
m_bOnline = true;
SetServerStatus(m_iDesiredStatus);
// initialize online timer
CallFunctionAsync(VKSetTimer, this);
db_unset(NULL, m_szModuleName, "LastNewsReqTime");
db_unset(NULL, m_szModuleName, "LastNotificationsReqTime");
}
示例10: while
void WhatsAppProto::sentinelLoop(void*)
{
while (WaitForSingleObjectEx(update_loop_lock_, 1000, true) == WAIT_TIMEOUT) {
if (m_iStatus != ID_STATUS_OFFLINE && m_pConnection != NULL && m_iDesiredStatus == m_iStatus) {
// #TODO Quiet after pong or tree read?
int quietInterval = difftime(time(NULL), m_tLastWriteTime);
if (quietInterval >= MAX_SILENT_INTERVAL) {
try {
debugLogA("send ping");
m_tLastWriteTime = time(NULL);
m_pConnection->sendPing();
}
catch (exception &e) {
debugLogA("Exception: %s", e.what());
}
}
}
}
ResetEvent(update_loop_lock_);
debugLogA("Exiting sentinel loop");
}
示例11: debugLogA
INT_PTR __cdecl CVkProto::SvcSetStatusMsg(WPARAM, LPARAM)
{
debugLogA("CVkProto::SvcSetStatusMsg");
if (!IsOnline())
return 1;
MsgPopup(NULL, TranslateT("Loading status message from vk.com.\nThis may take some time."), TranslateT("Waiting..."));
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/status.get.json", true, &CVkProto::OnReceiveStatusMsg));
return 0;
}
示例12: debugLogA
void CVkProto::MarkMessagesRead(const MCONTACT hContact)
{
debugLogA("CVkProto::MarkMessagesRead (hContact)");
if (!IsOnline() || !hContact)
return;
LONG userID = getDword(hContact, "ID", -1);
if (userID == -1 || userID == VK_FEED_USER)
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.markAsRead.json", true, &CVkProto::OnReceiveSmth, AsyncHttpRequest::rpLow)
<< INT_PARAM("peer_id", userID));
}
示例13: debugLogA
void FacebookProto::MessageLoop(void *)
{
time_t tim = ::time(NULL);
debugLogA(">>> Entering Facebook::MessageLoop[%d]", tim);
while (facy.channel())
{
if (isOffline() || m_signingOut)
break;
// If we're not idle, send activity_ping every few minutes...
if (!m_idleTS && (::time(NULL) - m_pingTS) > FACEBOOK_PING_TIME) {
debugLogA("*** FacebookProto::MessageLoop[%d] pinging...", tim);
facy.activity_ping();
}
debugLogA("*** FacebookProto::MessageLoop[%d] refreshing...", tim);
}
debugLogA("<<< Exiting FacebookProto::MessageLoop[%d]", tim);
}
示例14: debugLogA
INT_PTR __cdecl CVkProto::SvcWallPost(WPARAM hContact, LPARAM)
{
debugLogA("CVkProto::SvcWallPost");
WALLPOST_FORM_PARAMS param(db_get_tsa(hContact, m_szModuleName, "Nick"));
CVkWallPostForm dlg(this, ¶m);
if (!dlg.DoModal())
return 1;
WallPost((MCONTACT)hContact, param.ptszMsg, param.ptszUrl, param.bFriendsOnly);
return 0;
}
示例15: debugLogA
GGPROTO::~GGPROTO()
{
#ifdef DEBUGMODE
debugLogA("~GGPROTO(): destroying protocol interface");
#endif
// Destroy modules
block_uninit();
img_destroy();
keepalive_destroy();
gc_destroy();
Popup_UnregisterClass(hPopupError);
Popup_UnregisterClass(hPopupNotify);
if (hMenuRoot)
CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)hMenuRoot, 0);
// Close handles
Netlib_CloseHandle(m_hNetlibUser);
// Destroy mutexes
DeleteCriticalSection(&sess_mutex);
DeleteCriticalSection(&ft_mutex);
DeleteCriticalSection(&img_mutex);
DeleteCriticalSection(&modemsg_mutex);
DeleteCriticalSection(&avatar_mutex);
DeleteCriticalSection(&sessions_mutex);
#ifdef DEBUGMODE
debugLogA("~GGPROTO(): DeleteCriticalSections. OK");
#endif
// Free status messages
if (modemsg.online) mir_free(modemsg.online);
if (modemsg.away) mir_free(modemsg.away);
if (modemsg.dnd) mir_free(modemsg.dnd);
if (modemsg.freechat) mir_free(modemsg.freechat);
if (modemsg.invisible) mir_free(modemsg.invisible);
if (modemsg.offline) mir_free(modemsg.offline);
}