summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-19 14:12:58 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-19 14:13:06 +0300
commite254312f9a660c83081ce2062ab14ba3c3614089 (patch)
tree324dff386c4b394ed4dc0f9b912ce3332bd94e84 /protocols/AimOscar/src
parent54ad7c456325b4c7fd639ef2d7cca7d5aef81c05 (diff)
useless structure GCDEST finally removed
Diffstat (limited to 'protocols/AimOscar/src')
-rw-r--r--protocols/AimOscar/src/chat.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp
index 24df22d77b..7071c9a3da 100644
--- a/protocols/AimOscar/src/chat.cpp
+++ b/protocols/AimOscar/src/chat.cpp
@@ -59,10 +59,8 @@ void CAimProto::chat_event(const char* id, const char* sn, int evt, const wchar_
MCONTACT hContact = contact_from_sn(sn);
wchar_t *nick = hContact ? (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0) : snt;
- GCDEST gcd = { m_szModuleName, idt, evt };
- GCEVENT gce = { &gcd };
+ GCEVENT gce = { m_szModuleName, idt, evt };
gce.dwFlags = GCEF_ADDTOLOG;
- gce.pDest = &gcd;
gce.ptszNick = nick;
gce.ptszUID = snt;
gce.bIsMe = _stricmp(sn, m_username) == 0;
@@ -84,14 +82,15 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam)
GCHOOK *gch = (GCHOOK*)lParam;
if (!gch) return 1;
- if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
+ if (mir_strcmp(gch->pszModule, m_szModuleName))
+ return 0;
- char *id = mir_u2a(gch->pDest->ptszID);
+ char *id = mir_u2a(gch->ptszID);
chat_list_item* item = find_chat_by_id(id);
+ if (item == NULL)
+ return 0;
- if (item == NULL) return 0;
-
- switch (gch->pDest->iType) {
+ switch (gch->iType) {
case GC_SESSION_TERMINATE:
aim_sendflap(item->hconn, 0x04, 0, NULL, item->seqno);
Netlib_Shutdown(item->hconn);