summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather_addstn.cpp2
-rw-r--r--plugins/Weather/src/weather_data.cpp9
2 files changed, 3 insertions, 8 deletions
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 8cdd7c98ed..58379ec9c4 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -63,7 +63,7 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
// if contact with the same ID was not found, add it
if (psr->cbSize < sizeof(PROTOSEARCHRESULT)) return 0;
- MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = db_add_contact();
Proto_AddToContact(hContact, WEATHERPROTONAME);
// suppress online notification for the new contact
CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index eea3edf81b..498d9db482 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -403,14 +403,9 @@ int GetWeatherDataFromDB(const char *szSetting, LPARAM lparam)
//
void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM)
{
+ // get all the settings and store them in a temporary list
LIST<char> arSettings(10);
-
- // get all the settings and stored them in a temporary list
- DBCONTACTENUMSETTINGS dbces;
- dbces.lParam = (LPARAM)&arSettings;
- dbces.pfnEnumProc = GetWeatherDataFromDB;
- dbces.szModule = WEATHERCONDITION;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
+ db_enum_settings(hContact, GetWeatherDataFromDB, WEATHERCONDITION, &arSettings);
// begin deleting settings
for (int i = arSettings.getCount() - 1; i >= 0; i--) {