From 3e9e96f6718b13c069138fb40f24f065ac03c6b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Sep 2017 18:33:09 +0300 Subject: unneeded calls of DestroyServiceFunction() removed --- protocols/MSN/src/msn_links.cpp | 5 +---- protocols/MSN/src/msn_menu.cpp | 13 +++---------- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'protocols/MSN/src') 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 . #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 . 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); } -- cgit v1.2.3