summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/sendqueue.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-01 21:43:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-01 21:43:00 +0000
commita4570b58a7efb3b61db6d03b86d51d7be85a5f03 (patch)
tree059840bb704c9553a3c1c94514359b431231fcb3 /plugins/Scriver/src/sendqueue.cpp
parent585bd37dd3830d07c1d20b492fe0d4a84201b09a (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@11204 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/sendqueue.cpp')
-rw-r--r--plugins/Scriver/src/sendqueue.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp
index 93deeff0e8..51c6dbb972 100644
--- a/plugins/Scriver/src/sendqueue.cpp
+++ b/plugins/Scriver/src/sendqueue.cpp
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static MessageSendQueueItem *global_sendQueue = NULL;
static mir_cs queueMutex;
-TCHAR * GetSendBufferMsg(MessageSendQueueItem *item)
+TCHAR* GetSendBufferMsg(MessageSendQueueItem *item)
{
TCHAR *szMsg = NULL;
size_t len = strlen(item->sendBuffer);
@@ -34,7 +34,7 @@ TCHAR * GetSendBufferMsg(MessageSendQueueItem *item)
if (item->flags & PREF_UTF)
szMsg = mir_utf8decodeW(item->sendBuffer);
else {
- szMsg = (TCHAR *)mir_alloc(item->sendBufferSize - len - 1);
+ szMsg = (TCHAR*)mir_alloc(item->sendBufferSize - len - 1);
memcpy(szMsg, item->sendBuffer + len + 1, item->sendBufferSize - len - 1);
}
@@ -87,7 +87,7 @@ BOOL RemoveSendQueueItem(MessageSendQueueItem* item)
if (item->next != NULL)
item->next->prev = item->prev;
-
+
mir_free(item->sendBuffer);
mir_free(item->proto);
mir_free(item);
@@ -113,14 +113,15 @@ void ReportSendQueueTimeouts(HWND hwndSender)
if (item->timeout >= timeout) {
if (item->hwndSender == hwndSender && item->hwndErrorDlg == NULL) {
if (hwndSender != NULL) {
- ErrorWindowData *ewd = (ErrorWindowData *) mir_alloc(sizeof(ErrorWindowData));
+ ErrorWindowData *ewd = (ErrorWindowData *)mir_alloc(sizeof(ErrorWindowData));
ewd->szName = GetNickname(item->hContact, item->proto);
ewd->szDescription = mir_tstrdup(TranslateT("The message send timed out."));
ewd->szText = GetSendBufferMsg(item);
ewd->hwndParent = hwndSender;
ewd->queueItem = item;
PostMessage(hwndSender, DM_SHOWERRORMESSAGE, 0, (LPARAM)ewd);
- } else {
+ }
+ else {
/* TODO: Handle errors outside messaging window in a better way */
RemoveSendQueueItem(item);
}