diff options
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 13 |
2 files changed, 4 insertions, 10 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index dd739d10f1..cb9feb1564 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -456,6 +456,7 @@ static int ackevent(WPARAM wParam, LPARAM lParam) MessageWindowEvent evt = { sizeof(evt), (int)item->hSendId, item->hContact, &dbei };
NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
+ item->sendBuffer = (char*)dbei.pBlob;
db_event_add(item->hContact, &dbei);
if (item->hwndErrorDlg != NULL)
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 73c3e505e3..7807a4d193 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -104,17 +104,9 @@ entry_found: }
SendJob &job = m_jobs[iFound];
- int iLength = iLen;
- if (iLength > 0) {
- if (job.szSendBuffer == NULL) {
- if (iLength < HISTORY_INITIAL_ALLOCSIZE)
- iLength = HISTORY_INITIAL_ALLOCSIZE;
- job.szSendBuffer = (char*)mir_alloc(iLength);
- }
- else job.szSendBuffer = (char*)mir_realloc(job.szSendBuffer, iLength);
+ job.szSendBuffer = (char*)mir_alloc(iLen);
+ CopyMemory(job.szSendBuffer, dat->sendBuffer, iLen);
- CopyMemory(job.szSendBuffer, dat->sendBuffer, iLen);
- }
job.dwFlags = dwFlags;
job.dwTime = time(NULL);
@@ -748,6 +740,7 @@ inform_and_discard: MessageWindowEvent evt = { sizeof(evt), (int)job.hSendId, job.hOwner, &dbei };
NotifyEventHooks(PluginConfig.m_event_WriteEvent, 0, (LPARAM)&evt);
+ job.szSendBuffer = (char*)dbei.pBlob;
HANDLE hNewEvent = db_event_add(job.hOwner, &dbei);
if (m_pContainer)
|