summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt
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 /plugins/WhenWasIt
parentb5de62080a2384e9f66d7bafbf971aa5b4b7c0c1 (diff)
unneeded calls of DestroyServiceFunction() removed
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp3
-rw-r--r--plugins/WhenWasIt/src/services.cpp34
-rw-r--r--plugins/WhenWasIt/src/services.h1
3 files changed, 6 insertions, 32 deletions
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index ee26949b6d..f321c71a0c 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -154,9 +154,6 @@ extern "C" int __declspec(dllexport) Unload()
Log("%s", "Unhooking events ...");
UnhookEvents();
- Log("%s", "Destroying service functions ...");
- DestroyServices();
-
Log("%s", "Leaving function " __FUNCTION__);
return 0;
}
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 90585fe508..9db7956f2a 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -22,13 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define COMMENT_CHAR '#'
-HANDLE hsCheckBirthdays;
-HANDLE hsShowList;
-HANDLE hsAddBirthday;
-HANDLE hsRefreshUserDetails;
-HANDLE hsImportBirthdays;
-HANDLE hsExportBirthdays;
-
int bShouldCheckBirthdays = 0;
int bBirthdayFound = 0;
@@ -57,27 +50,12 @@ int InitServices()
commonData.cDlgTimeout = db_get_w(NULL, ModuleName, "DlgTimeout", POPUP_TIMEOUT);
commonData.notifyFor = db_get_b(NULL, ModuleName, "NotifyFor", 0);
- hsCheckBirthdays = CreateServiceFunction(MS_WWI_CHECK_BIRTHDAYS, CheckBirthdaysService);
- hsShowList = CreateServiceFunction(MS_WWI_LIST_SHOW, ShowListService);
- hsAddBirthday = CreateServiceFunction(MS_WWI_ADD_BIRTHDAY, AddBirthdayService);
- hsRefreshUserDetails = CreateServiceFunction(MS_WWI_REFRESH_USERDETAILS, RefreshUserDetailsService);
- hsImportBirthdays = CreateServiceFunction(MS_WWI_IMPORT_BIRTHDAYS, ImportBirthdaysService);
- hsExportBirthdays = CreateServiceFunction(MS_WWI_EXPORT_BIRTHDAYS, ExportBirthdaysService);
-
- Log("%s", "Leaving function " __FUNCTION__);
- return 0;
-}
-
-int DestroyServices()
-{
- Log("%s", "Entering function " __FUNCTION__);
-
- DestroyServiceFunction(hsCheckBirthdays);
- DestroyServiceFunction(hsShowList);
- DestroyServiceFunction(hsAddBirthday);
- DestroyServiceFunction(hsRefreshUserDetails);
- DestroyServiceFunction(hsImportBirthdays);
- DestroyServiceFunction(hsExportBirthdays);
+ CreateServiceFunction(MS_WWI_CHECK_BIRTHDAYS, CheckBirthdaysService);
+ CreateServiceFunction(MS_WWI_LIST_SHOW, ShowListService);
+ CreateServiceFunction(MS_WWI_ADD_BIRTHDAY, AddBirthdayService);
+ CreateServiceFunction(MS_WWI_REFRESH_USERDETAILS, RefreshUserDetailsService);
+ CreateServiceFunction(MS_WWI_IMPORT_BIRTHDAYS, ImportBirthdaysService);
+ CreateServiceFunction(MS_WWI_EXPORT_BIRTHDAYS, ExportBirthdaysService);
Log("%s", "Leaving function " __FUNCTION__);
return 0;
diff --git a/plugins/WhenWasIt/src/services.h b/plugins/WhenWasIt/src/services.h
index 25d1c453b8..1787f96ef5 100644
--- a/plugins/WhenWasIt/src/services.h
+++ b/plugins/WhenWasIt/src/services.h
@@ -36,7 +36,6 @@ extern int bShouldCheckBirthdays;
extern int bBirthdayFound;
int InitServices();
-int DestroyServices();
int NotifyContactBirthday(MCONTACT hContact, time_t now, int daysInAdvance);
int NotifyMissedContactBirthday(MCONTACT hContact, time_t now, int daysAfter);