From f90be5cdeec5875d1022e1ef35f5b101bd76ac84 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 10 Oct 2012 07:46:53 +0000 Subject: service call replaced with the direct function call git-svn-id: http://svn.miranda-ng.org/main/trunk@1857 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CmdLine/src/mimcmd_handlers.cpp | 16 ++++++++-------- plugins/CmdLine/src/utils.cpp | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/CmdLine') diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 05994188ae..061edf07b2 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -1841,7 +1841,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r char buffer[1024]; char protocol[128]; - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + hContact = db_find_first(); int count = 0; reply->code = MIMRES_SUCCESS; @@ -1878,7 +1878,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r free(contact); free(id); - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); + hContact = db_find_next(hContact); } } else{ @@ -1888,7 +1888,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r { HANDLE hContact = NULL; char protocol[128]; - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + hContact = db_find_first(); reply->code = MIMRES_SUCCESS; *reply->message = 0; @@ -1907,14 +1907,14 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r free(contact); free(id); - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); + hContact = db_find_next(hContact); } } else{ if (argc == 3) { HANDLE hContact = NULL; - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + hContact = db_find_first(); reply->code = MIMRES_SUCCESS; *reply->message = 0; @@ -1928,7 +1928,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, hContact, NULL, &threadID); } - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); + hContact = db_find_next(hContact); } } else { @@ -1998,7 +1998,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re { if (_stricmp(cmd, "unread") == 0) { - HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + HANDLE hContact = db_find_first(); char buffer[4096]; int count; int contacts = 0; @@ -2047,7 +2047,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re free(contact); } - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); + hContact = db_find_next(hContact); } } else{ diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp index 7d1136602f..70e86085cc 100644 --- a/plugins/CmdLine/src/utils.cpp +++ b/plugins/CmdLine/src/utils.cpp @@ -337,7 +337,7 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto) #pragma warning (disable: 4312) HANDLE GetContactFromID(TCHAR *szID, char *szProto) { - HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + HANDLE hContact = db_find_first(); TCHAR *szHandle; TCHAR dispName[1024]; char cProtocol[256]; @@ -359,7 +359,7 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto) if (szHandle) { free(szHandle); } if (found) { break; } - hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); + hContact = db_find_next(hContact); } return hContact; -- cgit v1.2.3