From a346491026d5df1ffe0d41e4881613a47ca6ca47 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 20 Apr 2013 14:25:52 +0000 Subject: end of the city legend that PSS_MESSAGEW ever existed git-svn-id: http://svn.miranda-ng.org/main/trunk@4482 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msgdialog.cpp | 56 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 29 deletions(-) (limited to 'plugins/TabSRMM/src/msgdialog.cpp') diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 29891b4142..96e2477eb1 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2698,40 +2698,38 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP sendQueue->handleError(dat, iNextFailed); break; } - case MSGERROR_RETRY: { - int resent = 0;; - - if (!(dat->dwFlags & MWF_ERRORSTATE)) - break; - - dat->cache->saveHistory(0, 0); - if (dat->iCurrentQueueError >= 0 && dat->iCurrentQueueError < SendQueue::NR_SENDJOBS) { - SendJob *job = sendQueue->getJobByIndex(dat->iCurrentQueueError); - - if (job->hSendId == 0 && job->hOwner == 0) - break; - job->hSendId = (HANDLE) CallContactService(job->hOwner, - SendQueue::MsgServiceName(job->hOwner, dat, job->dwFlags), (dat->sendMode & SMODE_FORCEANSI) ? (job->dwFlags & ~PREF_UNICODE) : job->dwFlags, (LPARAM)job->sendBuffer); - resent++; - } + case MSGERROR_RETRY: + if (dat->dwFlags & MWF_ERRORSTATE) { + int resent = 0; + + dat->cache->saveHistory(0, 0); + if (dat->iCurrentQueueError >= 0 && dat->iCurrentQueueError < SendQueue::NR_SENDJOBS) { + SendJob *job = sendQueue->getJobByIndex(dat->iCurrentQueueError); + if (job->hSendId == 0 && job->hOwner == 0) + break; - if (resent) { - int iNextFailed; - SendJob *job = sendQueue->getJobByIndex(dat->iCurrentQueueError); + job->hSendId = (HANDLE) CallContactService(job->hOwner, PSS_MESSAGE, + (dat->sendMode & SMODE_FORCEANSI) ? (job->dwFlags & ~PREF_UNICODE) : job->dwFlags, (LPARAM)job->sendBuffer); + resent++; + } - SetTimer(hwndDlg, TIMERID_MSGSEND + dat->iCurrentQueueError, PluginConfig.m_MsgTimeout, NULL); - job->iStatus = SendQueue::SQ_INPROGRESS; - dat->iCurrentQueueError = -1; - sendQueue->showErrorControls(dat, FALSE); - SetDlgItemText(hwndDlg, IDC_MESSAGE, _T("")); - sendQueue->checkQueue(dat); - if ((iNextFailed = sendQueue->findNextFailed(dat)) >= 0) - sendQueue->handleError(dat, iNextFailed); + if (resent) { + int iNextFailed; + SendJob *job = sendQueue->getJobByIndex(dat->iCurrentQueueError); + + SetTimer(hwndDlg, TIMERID_MSGSEND + dat->iCurrentQueueError, PluginConfig.m_MsgTimeout, NULL); + job->iStatus = SendQueue::SQ_INPROGRESS; + dat->iCurrentQueueError = -1; + sendQueue->showErrorControls(dat, FALSE); + SetDlgItemText(hwndDlg, IDC_MESSAGE, _T("")); + sendQueue->checkQueue(dat); + if ((iNextFailed = sendQueue->findNextFailed(dat)) >= 0) + sendQueue->handleError(dat, iNextFailed); + } } - } - break; } break; + case DM_SELECTTAB: SendMessage(hwndContainer, DM_SELECTTAB, wParam, lParam); // pass the msg to our container return 0; -- cgit v1.2.3