diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-16 21:07:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-16 21:07:15 +0000 |
commit | 970946fb23d2555a6d08cd0c5c065d7fd4bee322 (patch) | |
tree | ff8ef6a83b7cfd9270ba5d8eb89dc0ab2ff77c2d /src/modules/protocols | |
parent | 0df68ef45f3467047892d9b5547329aaac6e56f0 (diff) |
PS_CHANGEINFO is never called, and therefore exterminated
git-svn-id: http://svn.miranda-ng.org/main/trunk@8147 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols')
-rw-r--r-- | src/modules/protocols/protoaccs.cpp | 23 | ||||
-rw-r--r-- | src/modules/protocols/protocols.cpp | 51 | ||||
-rw-r--r-- | src/modules/protocols/protoint.cpp | 5 |
3 files changed, 25 insertions, 54 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 9f7480390b..9b4980b651 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -302,11 +302,6 @@ static INT_PTR stub4(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam) return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, StrConvT((const char*)lParam));
}
-static INT_PTR stub7(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
-{
- return (INT_PTR)ppi->ChangeInfo(wParam, (void*)lParam);
-}
-
static INT_PTR stub11(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
{
PROTOFILERESUME* pfr = (PROTOFILERESUME*)lParam;
@@ -445,7 +440,6 @@ BOOL ActivateAccount(PROTOACCOUNT* pa) CreateProtoServiceEx(pa->szModuleName, PS_ADDTOLISTBYEVENT, (MIRANDASERVICEOBJ)stub2, pa->ppro);
CreateProtoServiceEx(pa->szModuleName, PS_AUTHALLOW, (MIRANDASERVICEOBJ)stub3, pa->ppro);
CreateProtoServiceEx(pa->szModuleName, PS_AUTHDENY, (MIRANDASERVICEOBJ)stub4, pa->ppro);
- CreateProtoServiceEx(pa->szModuleName, PS_CHANGEINFO, (MIRANDASERVICEOBJ)stub7, pa->ppro);
CreateProtoServiceEx(pa->szModuleName, PS_FILERESUME, (MIRANDASERVICEOBJ)stub11, pa->ppro);
CreateProtoServiceEx(pa->szModuleName, PS_GETCAPS, (MIRANDASERVICEOBJ)stub12, pa->ppro);
CreateProtoServiceEx(pa->szModuleName, PS_LOADICON, (MIRANDASERVICEOBJ)stub13, pa->ppro);
@@ -461,15 +455,15 @@ BOOL ActivateAccount(PROTOACCOUNT* pa) CreateProtoServiceEx(pa->szModuleName, PS_GETSTATUS, (MIRANDASERVICEOBJ)stub42, pa->ppro);
if (!ProtoServiceExists(pa->szModuleName, PS_GETAVATARINFO))
- if ( ProtoServiceExists(pa->szModuleName, PS_GETAVATARINFOW))
+ if (ProtoServiceExists(pa->szModuleName, PS_GETAVATARINFOW))
CreateProtoServiceEx(pa->szModuleName, PS_GETAVATARINFO, (MIRANDASERVICEOBJ)stub43, pa->ppro);
if (!ProtoServiceExists(pa->szModuleName, PS_GETMYAVATAR))
- if ( ProtoServiceExists(pa->szModuleName, PS_GETMYAVATARW))
+ if (ProtoServiceExists(pa->szModuleName, PS_GETMYAVATARW))
CreateProtoServiceEx(pa->szModuleName, PS_GETMYAVATAR, (MIRANDASERVICEOBJ)stub44, pa->ppro);
if (!ProtoServiceExists(pa->szModuleName, PS_SETMYAVATAR))
- if ( ProtoServiceExists(pa->szModuleName, PS_SETMYAVATARW))
+ if (ProtoServiceExists(pa->szModuleName, PS_SETMYAVATARW))
CreateProtoServiceEx(pa->szModuleName, PS_SETMYAVATAR, (MIRANDASERVICEOBJ)stub45, pa->ppro);
return TRUE;
@@ -480,19 +474,18 @@ BOOL ActivateAccount(PROTOACCOUNT* pa) struct DeactivationThreadParam
{
PROTO_INTERFACE *ppro;
- pfnUninitProto fnUninit;
- bool bIsDynamic;
- bool bErase;
+ pfnUninitProto fnUninit;
+ bool bIsDynamic, bErase;
};
pfnUninitProto GetProtocolDestructor(char *szProto);
static int DeactivationThread(DeactivationThreadParam* param)
{
- PROTO_INTERFACE* p = (PROTO_INTERFACE*)param->ppro;
+ PROTO_INTERFACE *p = (PROTO_INTERFACE*)param->ppro;
p->SetStatus(ID_STATUS_OFFLINE);
- char * szModuleName = NEWSTR_ALLOCA(p->m_szModuleName);
+ char *szModuleName = NEWSTR_ALLOCA(p->m_szModuleName);
if (param->bIsDynamic) {
p->OnEvent(EV_PROTO_ONREADYTOEXIT, 0, 0);
@@ -531,7 +524,7 @@ void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase) pa->bAccMgrUIChanged = FALSE;
}
- DeactivationThreadParam* param = new DeactivationThreadParam;
+ DeactivationThreadParam *param = new DeactivationThreadParam;
param->ppro = pa->ppro;
param->fnUninit = GetProtocolDestructor(pa->szProtoName);
param->bIsDynamic = bIsDynamic;
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index dfbbd9950f..c0b0410563 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -411,26 +411,21 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 4:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, (PROTOCHAR*)lParam);
+ return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, (PROTOCHAR*)lParam);
case 5: return (INT_PTR)ppi->AuthRecv(hContact, (PROTORECVEVENT*)lParam);
case 6:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthRequest(hContact, StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->AuthRequest(hContact, (PROTOCHAR*)lParam);
- case 7: return (INT_PTR)ppi->ChangeInfo(wParam, (void*)lParam);
+ return (INT_PTR)ppi->AuthRequest(hContact, (PROTOCHAR*)lParam);
case 8:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
+ return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
case 9: return (INT_PTR)ppi->FileCancel(hContact, (HANDLE)wParam);
case 10:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
+ return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
case 11: {
PROTOFILERESUME* pfr = (PROTOFILERESUME*)lParam;
if (ppi->m_iVersion > 1) {
@@ -448,13 +443,11 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 15:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SearchBasic(StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->SearchBasic((TCHAR*)lParam);
+ return (INT_PTR)ppi->SearchBasic((TCHAR*)lParam);
case 16:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SearchByEmail(StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->SearchByEmail((TCHAR*)lParam);
+ return (INT_PTR)ppi->SearchByEmail((TCHAR*)lParam);
case 17: {
PROTOSEARCHBYNAME* psbn = (PROTOSEARCHBYNAME*)lParam;
if (ppi->m_iVersion > 1)
@@ -477,7 +470,7 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char if (res == 0) FreeFilesMatrix(&files);
return res;
}
- else return (INT_PTR)ppi->SendFile(hContact, (TCHAR*)wParam, (TCHAR**)lParam);
+ return (INT_PTR)ppi->SendFile(hContact, (TCHAR*)wParam, (TCHAR**)lParam);
case 26: return (INT_PTR)ppi->SendMsg(hContact, wParam, (const char*)lParam);
case 27: return (INT_PTR)ppi->SendUrl(hContact, wParam, (const char*)lParam);
@@ -488,8 +481,7 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 33:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SetAwayMsg(wParam, StrConvT((char*)lParam));
- else
- return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
+ return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
case 34: return (INT_PTR)ppi->UserIsTyping(wParam, lParam);
case 35: lstrcpynA((char*)lParam, ppi->m_szModuleName, wParam); return 0;
case 36: return ppi->m_iStatus;
@@ -497,8 +489,7 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 100:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
- else
- return (INT_PTR)ppi->SetAwayMsg(wParam, StrConvA((TCHAR*)lParam));
+ return (INT_PTR)ppi->SetAwayMsg(wParam, StrConvA((TCHAR*)lParam));
case 102:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SendFile(hContact, (TCHAR*)wParam, (TCHAR**)lParam);
@@ -511,13 +502,11 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 103:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, (TCHAR*)lParam);
- else
- return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, StrConvA((TCHAR*)lParam));
+ return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, StrConvA((TCHAR*)lParam));
case 104:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, (TCHAR*)lParam);
- else
- return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, StrConvA((TCHAR*)lParam));
+ return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, StrConvA((TCHAR*)lParam));
case 105: {
PROTOFILERESUME* pfr = (PROTOFILERESUME*)lParam;
if (ppi->m_iVersion > 1)
@@ -533,31 +522,26 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 106:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthRequest(hContact, (const TCHAR*)lParam);
- else
- return (INT_PTR)ppi->AuthRequest(hContact, StrConvA((const TCHAR*)lParam));
+ return (INT_PTR)ppi->AuthRequest(hContact, StrConvA((const TCHAR*)lParam));
case 107:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, (const TCHAR*)lParam);
- else
- return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, StrConvA((const TCHAR*)lParam));
+ return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, StrConvA((const TCHAR*)lParam));
case 108:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SearchBasic((const TCHAR*)lParam);
- else
- return (INT_PTR)ppi->SearchBasic(StrConvA((const TCHAR*)lParam));
+ return (INT_PTR)ppi->SearchBasic(StrConvA((const TCHAR*)lParam));
case 109: {
PROTOSEARCHBYNAME* psbn = (PROTOSEARCHBYNAME*)lParam;
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SearchByName(psbn->pszNick, psbn->pszFirstName, psbn->pszLastName);
- else
- return (INT_PTR)ppi->SearchByName(StrConvA((TCHAR*)psbn->pszNick),
- StrConvA((TCHAR*)psbn->pszFirstName), StrConvA((TCHAR*)psbn->pszLastName));
+ return (INT_PTR)ppi->SearchByName(StrConvA((TCHAR*)psbn->pszNick),
+ StrConvA((TCHAR*)psbn->pszFirstName), StrConvA((TCHAR*)psbn->pszLastName));
}
case 110:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->SearchByEmail((const TCHAR*)lParam);
- else
- return (INT_PTR)ppi->SearchByEmail(StrConvA((const TCHAR*)lParam));
+ return (INT_PTR)ppi->SearchByEmail(StrConvA((const TCHAR*)lParam));
}
}
}
@@ -651,7 +635,6 @@ int LoadProtocolsModule(void) InsertServiceListItem( 4, PS_AUTHDENY);
InsertServiceListItem( 5, PSR_AUTH);
InsertServiceListItem( 6, PSS_AUTHREQUEST);
- InsertServiceListItem( 7, PS_CHANGEINFO);
InsertServiceListItem( 8, PSS_FILEALLOW);
InsertServiceListItem( 9, PSS_FILECANCEL);
InsertServiceListItem(10, PSS_FILEDENY);
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp index 5ea1f1c371..70fccaa18c 100644 --- a/src/modules/protocols/protoint.cpp +++ b/src/modules/protocols/protoint.cpp @@ -82,11 +82,6 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData)
- {
- return (HANDLE)ProtoCallService(m_szModuleName, PS_CHANGEINFO, iInfoType, (LPARAM)pInfoData);
- }
-
HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
CCSDATA ccs = { hContact, PSS_FILEALLOW, (WPARAM)hTransfer, (LPARAM)szPath };
|