diff options
author | George Hazan <ghazan@miranda.im> | 2019-05-12 20:38:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-05-12 20:38:09 +0300 |
commit | 0dd998f1a2d1ca3a3fca9bc6ea85c40ccfeae850 (patch) | |
tree | 53ec8cef9966ec67509794c8671d5da9a3ffaabb /plugins/Scriver/src/sendqueue.h | |
parent | 702e42dea8866b0c0c305fa5b3e53f7003d952b4 (diff) |
fixes #1948 (memory allocation problem in Scriver)
Diffstat (limited to 'plugins/Scriver/src/sendqueue.h')
-rw-r--r-- | plugins/Scriver/src/sendqueue.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/Scriver/src/sendqueue.h b/plugins/Scriver/src/sendqueue.h index 1efb70dbe4..092d43a602 100644 --- a/plugins/Scriver/src/sendqueue.h +++ b/plugins/Scriver/src/sendqueue.h @@ -24,8 +24,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef SRMM_SENDQUEUE_H
#define SRMM_SENDQUEUE_H
-struct MessageSendQueueItem
+struct MessageSendQueueItem : public MZeroedObject
{
+ ~MessageSendQueueItem()
+ {
+ mir_free(proto);
+ mir_free(sendBuffer);
+ }
+
HWND hwndSender;
MCONTACT hContact;
char *proto;
@@ -36,18 +42,16 @@ struct MessageSendQueueItem int codepage;
int flags;
HWND hwndErrorDlg;
-
- MessageSendQueueItem *prev, *next;
};
MessageSendQueueItem* CreateSendQueueItem(HWND hwndSender);
-wchar_t * GetSendBufferMsg(MessageSendQueueItem *item);
MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, MCONTACT hContact);
MessageSendQueueItem* FindSendQueueItem(MCONTACT hContact, HANDLE hSendId);
-BOOL RemoveSendQueueItem(MessageSendQueueItem* item);
+
+bool RemoveSendQueueItem(MessageSendQueueItem* item);
void ReportSendQueueTimeouts(HWND hwndSender);
void ReleaseSendQueueItems(HWND hwndSender);
-int ReattachSendQueueItems(HWND hwndSender, MCONTACT hContact);
+int ReattachSendQueueItems(HWND hwndSender, MCONTACT hContact);
void RemoveAllSendQueueItems();
void SendSendQueueItem(MessageSendQueueItem* item);
|