summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-18 18:33:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-18 18:33:09 +0300
commit3e9e96f6718b13c069138fb40f24f065ac03c6b7 (patch)
treed09301e8d63cf2bc70601fe683992440d4e2e086 /protocols
parentb5de62080a2384e9f66d7bafbf971aa5b4b7c0c1 (diff)
unneeded calls of DestroyServiceFunction() removed
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/aim.cpp2
-rw-r--r--protocols/AimOscar/src/links.cpp9
-rw-r--r--protocols/AimOscar/src/links.h1
-rw-r--r--protocols/IRCG/src/services.cpp14
-rw-r--r--protocols/MSN/src/msn_links.cpp5
-rw-r--r--protocols/MSN/src/msn_menu.cpp13
6 files changed, 9 insertions, 35 deletions
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp
index 56ee8e3943..c169e47aa4 100644
--- a/protocols/AimOscar/src/aim.cpp
+++ b/protocols/AimOscar/src/aim.cpp
@@ -116,7 +116,6 @@ extern "C" int __declspec(dllexport) Load(void)
InitIcons();
InitExtraIcons();
-
return 0;
}
@@ -125,6 +124,5 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload(void)
{
- aim_links_destroy();
return 0;
}
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp
index f16fd3131b..13671e8518 100644
--- a/protocols/AimOscar/src/links.cpp
+++ b/protocols/AimOscar/src/links.cpp
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-static HANDLE hServiceParseLink;
-
extern OBJLIST<CAimProto> g_Instances;
static int SingleHexToDecimal(wchar_t c)
@@ -168,11 +166,6 @@ void aim_links_init(void)
{
static const char szService[] = "AIM/ParseAimLink";
- hServiceParseLink = CreateServiceFunction(szService, ServiceParseAimLink);
+ CreateServiceFunction(szService, ServiceParseAimLink);
AssocMgr_AddNewUrlTypeT("aim:", TranslateT("AIM link protocol"), hInstance, IDI_AOL, szService, 0);
}
-
-void aim_links_destroy(void)
-{
- DestroyServiceFunction(hServiceParseLink);
-}
diff --git a/protocols/AimOscar/src/links.h b/protocols/AimOscar/src/links.h
index 2aac49447b..5eb95a9eab 100644
--- a/protocols/AimOscar/src/links.h
+++ b/protocols/AimOscar/src/links.h
@@ -19,6 +19,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LINKS_H
void aim_links_init();
-void aim_links_destroy();
#endif
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 8e56330c58..df95b79dbc 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -63,7 +63,6 @@ void CIrcProto::InitMainMenus(void)
/////////////////////////////////////////////////////////////////////////////////////////
static HGENMENU hUMenuChanSettings, hUMenuWhois, hUMenuDisconnect, hUMenuIgnore;
-static HANDLE hMenuChanSettings, hMenuWhois, hMenuDisconnect, hMenuIgnore;
static CIrcProto* IrcGetInstanceByHContact(MCONTACT hContact)
{
@@ -127,7 +126,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_CHANSETTINGS);
mi.position = 500090002;
hUMenuChanSettings = Menu_AddContactMenuItem(&mi);
- hMenuChanSettings = CreateServiceFunction(temp, IrcMenuChanSettings);
+ CreateServiceFunction(temp, IrcMenuChanSettings);
SET_UID(mi, 0x778eb1f6, 0x73c4, 0x4951, 0xb2, 0xca, 0xa1, 0x69, 0x94, 0x7b, 0xb7, 0x87);
mi.name.a = LPGEN("&WhoIs info");
@@ -135,7 +134,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_WHOIS);
mi.position = 500090001;
hUMenuWhois = Menu_AddContactMenuItem(&mi);
- hMenuWhois = CreateServiceFunction(temp, IrcMenuWhois);
+ CreateServiceFunction(temp, IrcMenuWhois);
SET_UID(mi, 0x1c51ae05, 0x9eee, 0x4887, 0x88, 0x96, 0x55, 0xd2, 0xdd, 0xf9, 0x25, 0x6f);
mi.name.a = LPGEN("Di&sconnect");
@@ -143,7 +142,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_DISCONNECT);
mi.position = 500090001;
hUMenuDisconnect = Menu_AddContactMenuItem(&mi);
- hMenuDisconnect = CreateServiceFunction(temp, IrcMenuDisconnect);
+ CreateServiceFunction(temp, IrcMenuDisconnect);
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
mi.name.a = LPGEN("&Add to ignore list");
@@ -151,7 +150,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_IGNORE);
mi.position = 500090002;
hUMenuIgnore = Menu_AddContactMenuItem(&mi);
- hMenuIgnore = CreateServiceFunction(temp, IrcMenuIgnore);
+ CreateServiceFunction(temp, IrcMenuIgnore);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, IrcPrebuildContactMenu);
}
@@ -162,11 +161,6 @@ void UninitContactMenus(void)
Menu_RemoveItem(hUMenuWhois);
Menu_RemoveItem(hUMenuDisconnect);
Menu_RemoveItem(hUMenuIgnore);
-
- DestroyServiceFunction(hMenuChanSettings);
- DestroyServiceFunction(hMenuWhois);
- DestroyServiceFunction(hMenuDisconnect);
- DestroyServiceFunction(hMenuIgnore);
}
INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam)
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp
index ab0802bcb1..590be7fe48 100644
--- a/protocols/MSN/src/msn_links.cpp
+++ b/protocols/MSN/src/msn_links.cpp
@@ -25,8 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "m_assocmgr.h"
-static HANDLE hServiceParseLink;
-
static MCONTACT GetContact(wchar_t *arg, wchar_t **pemail, CMsnProto *proto)
{
wchar_t* email = NULL;
@@ -143,12 +141,11 @@ void MsnLinks_Init(void)
{
static const char szService[] = "MSN/ParseMsnimLink";
- hServiceParseLink = CreateServiceFunction(szService, ServiceParseMsnimLink);
+ CreateServiceFunction(szService, ServiceParseMsnimLink);
AssocMgr_AddNewUrlTypeT("msnim:", TranslateT("MSN Link Protocol"), g_hInst, IDI_MSN, szService, 0);
}
void MsnLinks_Destroy(void)
{
- DestroyServiceFunction(hServiceParseLink);
CallService(MS_ASSOCMGR_REMOVEURLTYPE, 0, (LPARAM)"msnim:");
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 9c37f90f5a..f11e6726eb 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -25,8 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static HGENMENU hBlockMenuItem, hLiveSpaceMenuItem, hNetmeetingMenuItem, hChatInviteMenuItem, hOpenInboxMenuItem;
-HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile;
-
// Block command callback function
INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM)
{
@@ -245,7 +243,7 @@ void MSN_InitContactMenu(void)
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
mir_strcpy(tDest, MSN_BLOCK);
- hBlockCom = CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
+ CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
mi.position = -500050000;
mi.hIcolibItem = GetIconHandle(IDI_MSNBLOCK);
mi.name.a = LPGEN("&Block");
@@ -253,7 +251,7 @@ void MSN_InitContactMenu(void)
SET_UID(mi, 0x7f7e4c24, 0x821c, 0x450f, 0x93, 0x76, 0xbe, 0x65, 0xe9, 0x2f, 0xb6, 0xc2);
mir_strcpy(tDest, MSN_VIEW_PROFILE);
- hViewProfile = CreateServiceFunction(servicefunction, MsnMenuViewProfile);
+ CreateServiceFunction(servicefunction, MsnMenuViewProfile);
mi.position = -500050003;
mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
mi.name.a = LPGEN("View &Profile");
@@ -261,7 +259,7 @@ void MSN_InitContactMenu(void)
SET_UID(mi,0x25a007c0, 0x8dc7, 0x4284, 0x8a, 0x5e, 0x2, 0x83, 0x17, 0x5d, 0x52, 0xea);
mir_strcpy(tDest, "/SendHotmail");
- hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
+ CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
mi.position = -2000010005;
mi.flags = CMIF_HIDDEN;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
@@ -277,9 +275,4 @@ void MSN_RemoveContactMenus(void)
Menu_RemoveItem(hLiveSpaceMenuItem);
Menu_RemoveItem(hChatInviteMenuItem);
Menu_RemoveItem(hOpenInboxMenuItem);
-
- DestroyServiceFunction(hBlockCom);
- DestroyServiceFunction(hSendHotMail);
- DestroyServiceFunction(hInviteChat);
- DestroyServiceFunction(hViewProfile);
}