summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-10 23:33:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-10 23:33:35 +0000
commit18448e7014c32235db05465f1bf76b30f9954029 (patch)
treeebf78a23f27c92eeff9ad3d185258ea8fe029e97 /protocols/SkypeClassic/src
parent452fb59c22573ddf7939bea02b5e58f4f2e3916c (diff)
GCDEST::pszModule and GCDEST::ptszID must be constant
git-svn-id: http://svn.miranda-ng.org/main/trunk@7586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic/src')
-rw-r--r--protocols/SkypeClassic/src/gchat.cpp16
-rw-r--r--protocols/SkypeClassic/src/gchat.h6
-rw-r--r--protocols/SkypeClassic/src/skype.cpp2
3 files changed, 12 insertions, 12 deletions
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;i<chatcount;i++)
@@ -165,7 +165,7 @@ void RemChatContact(gchat_contacts *gc, const TCHAR *who) {
}
}
-HANDLE find_chat(TCHAR *chatname) {
+HANDLE find_chat(LPCTSTR chatname) {
char *szProto;
int tCompareResult;
HANDLE hContact;
@@ -390,7 +390,7 @@ int __cdecl ChatInit(WPARAM wParam, LPARAM lParam)
if (!CallService(MS_GC_NEWSESSION, 0, (LPARAM)&gcw)) {
char *szChatRole;
- GCDEST gcd = { SKYPE_PROTONAME, (TCHAR*)gcw.ptszID, GC_EVENT_ADDGROUP };
+ GCDEST gcd = { SKYPE_PROTONAME, gcw.ptszID, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
gce.ptszStatus = _T("CREATOR");
// BUG: Groupchat returns nonzero on success here in earlier versions, so we don't check
@@ -476,7 +476,7 @@ void KillChatSession(GCDEST *gcd)
LeaveCriticalSection(&m_GCMutex);
}
-void InviteUser(TCHAR *szChatId)
+void InviteUser(const TCHAR *szChatId)
{
HMENU tMenu = CreatePopupMenu();
HANDLE hContact = db_find_first(), hInvitedUser;
@@ -535,7 +535,7 @@ static void KickUser (HANDLE hContact, GCHOOK *gch)
if (SkypeSend ("ALTER CHAT "STR" KICK "STR, gch->pDest->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)