summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/mim.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-11 12:30:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-11 12:30:35 +0000
commite5a52db1e9acd0dc80c7581f20bacf63e1d08722 (patch)
tree9c09fb8edc2e0ea3571956a95457544bb3f3d4e9 /plugins/TabSRMM/src/mim.cpp
parentf9a8ee1e76018444b934c14c9288a89dbb7f84ac (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/mim.cpp')
-rw-r--r--plugins/TabSRMM/src/mim.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index e858d37ff3..d7fc9f7b20 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -435,30 +435,25 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam)
return 0;
HWND hwndDlg = 0;
- int i=0, j, iFound = SendQueue::NR_SENDJOBS;
+ int i=0, iFound = SendQueue::NR_SENDJOBS;
SendJob *jobs = sendQueue->getJobByIndex(0);
if (pAck->type == ACKTYPE_MESSAGE) {
- MCONTACT hOwner = db_mc_getMeta(pAck->hContact);
- if (hOwner == 0)
- hOwner = pAck->hContact;
-
- for (j = 0; j < SendQueue::NR_SENDJOBS; j++) {
- if (pAck->hProcess == jobs[j].hSendId && hOwner == jobs[j].hOwner) {
- TWindowData *dat = jobs[j].hwndOwner ? (TWindowData*)GetWindowLongPtr(jobs[j].hwndOwner, GWLP_USERDATA) : NULL;
- if (dat) {
- if (dat->hContact == jobs[j].hOwner) {
- iFound = j;
- break;
- }
- } else { // ack message w/o an open window...
+ MCONTACT hMeta = db_mc_getMeta(pAck->hContact);
+ for (int j = 0; j < SendQueue::NR_SENDJOBS; j++) {
+ SendJob &p = jobs[j];
+ if (pAck->hProcess == p.hSendId && pAck->hContact == p.hOwner) {
+ TWindowData *dat = p.hwndOwner ? (TWindowData*)GetWindowLongPtr(p.hwndOwner, GWLP_USERDATA) : NULL;
+ if (dat == NULL) {
sendQueue->ackMessage(NULL, (WPARAM)MAKELONG(j, i), lParam);
return 0;
}
+ if (dat->hContact == p.hOwner || dat->hContact == hMeta) {
+ iFound = j;
+ break;
+ }
}
- if (iFound == SendQueue::NR_SENDJOBS) // no mathing entry found in this queue entry.. continue
- continue;
- else
+ if (iFound != SendQueue::NR_SENDJOBS) // no mathing entry found in this queue entry.. continue
break;
}
if (iFound == SendQueue::NR_SENDJOBS) // no matching send info found in the queue