diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-11 12:30:35 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-11 12:30:35 +0000 |
commit | e5a52db1e9acd0dc80c7581f20bacf63e1d08722 (patch) | |
tree | 9c09fb8edc2e0ea3571956a95457544bb3f3d4e9 /plugins/TabSRMM/src/sendqueue.cpp | |
parent | f9a8ee1e76018444b934c14c9288a89dbb7f84ac (diff) |
fix for tabSRMM send queue
git-svn-id: http://svn.miranda-ng.org/main/trunk@8555 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/sendqueue.cpp')
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index bf0ef923e9..8e8610bc3a 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -308,13 +308,17 @@ int SendQueue::getSendLength(const int iEntry, int sendMode) int SendQueue::sendQueued(TWindowData *dat, const int iEntry)
{
+ CContactCache *ccActive = CContactCache::getContactCache(dat->hContact);
+ if (ccActive == NULL)
+ return 0;
+
HWND hwndDlg = dat->hwnd;
if (dat->sendMode & SMODE_MULTIPLE) {
int iJobs = 0;
int iMinLength = 0;
- m_jobs[iEntry].hOwner = dat->hContact;
+ m_jobs[iEntry].hOwner = ccActive->getActiveContact();
m_jobs[iEntry].iStatus = SQ_INPROGRESS;
m_jobs[iEntry].hwndOwner = hwndDlg;
@@ -332,7 +336,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) if (iSendLength >= iMinLength) {
TCHAR tszError[256];
mir_sntprintf(tszError, 256, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), iMinLength);
- ::SendMessage(dat->hwnd, DM_ACTIVATETOOLTIP, IDC_MESSAGE, reinterpret_cast<LPARAM>(tszError));
+ ::SendMessage(dat->hwnd, DM_ACTIVATETOOLTIP, IDC_MESSAGE, LPARAM(tszError));
sendQueue->clearJob(iEntry);
return 0;
}
@@ -347,7 +351,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) sendQueue->clearJob(iEntry);
if (iJobs)
- sendLater->flushQueue(); // force queue processing
+ sendLater->flushQueue(); // force queue processing
return 0;
}
@@ -370,7 +374,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) if (!fSplit)
goto send_unsplitted;
- m_jobs[iEntry].hOwner = dat->hContact;
+ m_jobs[iEntry].hOwner = ccActive->getActiveContact();
m_jobs[iEntry].hwndOwner = hwndDlg;
m_jobs[iEntry].iStatus = SQ_INPROGRESS;
m_jobs[iEntry].iAcksNeeded = 1;
@@ -390,7 +394,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) send_unsplitted:
- m_jobs[iEntry].hOwner = dat->hContact;
+ m_jobs[iEntry].hOwner = ccActive->getActiveContact();
m_jobs[iEntry].hwndOwner = hwndDlg;
m_jobs[iEntry].iStatus = SQ_INPROGRESS;
m_jobs[iEntry].iAcksNeeded = 1;
@@ -400,7 +404,7 @@ send_unsplitted: int iSendLength = getSendLength(iEntry, dat->sendMode);
if (iSendLength >= dat->nMax) {
mir_sntprintf(tszError, 256, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), dat->nMax);
- SendMessage(dat->hwnd, DM_ACTIVATETOOLTIP, IDC_MESSAGE, reinterpret_cast<LPARAM>(tszError));
+ SendMessage(dat->hwnd, DM_ACTIVATETOOLTIP, IDC_MESSAGE, LPARAM(tszError));
clearJob(iEntry);
return 0;
}
|