From 18448e7014c32235db05465f1bf76b30f9954029 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Jan 2014 23:33:35 +0000 Subject: GCDEST::pszModule and GCDEST::ptszID must be constant git-svn-id: http://svn.miranda-ng.org/main/trunk@7586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeClassic/src/gchat.cpp | 16 ++++++++-------- protocols/SkypeClassic/src/gchat.h | 6 +++--- protocols/SkypeClassic/src/skype.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'protocols/SkypeClassic') diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp index 815521e699..0a1ea0441b 100644 --- a/protocols/SkypeClassic/src/gchat.cpp +++ b/protocols/SkypeClassic/src/gchat.cpp @@ -48,7 +48,7 @@ static CRITICAL_SECTION m_GCMutex; Returns: Pointer to the gchat_contacts entry for the given id. NULL on failure (not enough memory) */ -gchat_contacts *GetChat(TCHAR *szChatId) { +gchat_contacts *GetChat(const TCHAR *szChatId) { int i; for (i=0;ipDest->ptszID, gch->ptszUID)!=-1) { if (ptr=SkypeRcv("ALTER CHAT KICK", 2000)) { if (strncmp(ptr, "ERROR", 5)) { - GCDEST gcd = { SKYPE_PROTONAME, (TCHAR*)gch->pDest->ptszID, GC_EVENT_KICK }; + GCDEST gcd = { SKYPE_PROTONAME, gch->pDest->ptszID, GC_EVENT_KICK }; GCEVENT gce = { sizeof(gce), &gcd }; gce.time = (DWORD)time(NULL); gce.dwFlags = GCEF_ADDTOLOG; @@ -564,7 +564,7 @@ static void KickUser (HANDLE hContact, GCHOOK *gch) LeaveCriticalSection(&m_GCMutex); } -void SetChatTopic (TCHAR *szChatId, TCHAR *szTopic, BOOL bSet) +void SetChatTopic(const TCHAR *szChatId, TCHAR *szTopic, BOOL bSet) { HANDLE hContact = find_chat (szChatId); char *szUTFTopic; @@ -704,11 +704,11 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) { { TCHAR *ptr, buf[MAX_BUF]; - ptr = SkypeGetT ("CHAT", gch->pDest->ptszID, "TOPIC"); + ptr = SkypeGetT ("CHAT", (TCHAR*)gch->pDest->ptszID, "TOPIC"); _tcscpy(buf, ptr); free(ptr); if (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INPUTBOX), NULL, InputBoxDlgProc, (LPARAM)&buf)) - SetChatTopic (gch->pDest->ptszID, buf, TRUE); + SetChatTopic(gch->pDest->ptszID, buf, TRUE); break; } } diff --git a/protocols/SkypeClassic/src/gchat.h b/protocols/SkypeClassic/src/gchat.h index f9bd283320..1b3cfcbe73 100644 --- a/protocols/SkypeClassic/src/gchat.h +++ b/protocols/SkypeClassic/src/gchat.h @@ -25,8 +25,8 @@ typedef struct { int ChatInit(WPARAM, LPARAM); int __cdecl ChatStart(char *szChatId, BOOL bJustCreate); -gchat_contacts *GetChat(TCHAR *szChatId); -HANDLE find_chat(TCHAR *chatname); +gchat_contacts *GetChat(LPCTSTR szChatId); +HANDLE find_chat(LPCTSTR chatname); #ifdef _UNICODE HANDLE find_chatA(char *chatname); #else @@ -44,4 +44,4 @@ INT_PTR GCOnLeaveChat(WPARAM wParam,LPARAM lParam); INT_PTR GCOnJoinChat(WPARAM wParam,LPARAM lParam); void GCInit(void); void GCExit(void); -void SetChatTopic (TCHAR *szChatId, TCHAR *szTopic, BOOL bSet); +void SetChatTopic (const TCHAR *szChatId, TCHAR *szTopic, BOOL bSet); diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 2c2d6ef737..20a75aaea5 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -1259,7 +1259,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { MsgList_Add (pre.lParam, INVALID_HANDLE_VALUE); // Mark as groupchat if (ci.pszVal) mir_free (ci.pszVal); free_nonutf_tchar_string((void*)gce.ptszUID); - free_nonutf_tchar_string(gcd.ptszID); + free_nonutf_tchar_string((void*)gcd.ptszID); // Yes, we have successfully read the msg if (!args.bDontMarkSeen) -- cgit v1.2.3