summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp4
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp2
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp2
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp4
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp2
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_rc.cpp4
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp2
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_util.cpp4
12 files changed, 18 insertions, 18 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 76772609f9..78542e10f0 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -711,7 +711,7 @@ class CGroupchatInviteDlg : public CJabberDlgBase
hContact;
hContact = db_find_next(hContact))
{
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if (lstrcmpA(proto, m_proto->m_szModuleName) || db_get_b(hContact, proto, "ChatRoom", 0))
if (HANDLE hItem = m_clc.FindContact(hContact))
m_clc.DeleteItem(hItem);
@@ -829,7 +829,7 @@ public:
hContact;
hContact = db_find_next(hContact))
{
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if ( !lstrcmpA(proto, m_proto->m_szModuleName) && !db_get_b(hContact, proto, "ChatRoom", 0))
{
if (int hItem = SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0))
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 84981edb0f..2df794d300 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -539,7 +539,7 @@ void CJabberProto::CheckAllContactsAreTransported()
{
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if ( !lstrcmpA(m_szModuleName, szProto)) {
DBVARIANT dbv;
if ( !JGetStringT(hContact, "jid", &dbv)) {
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index b043e7fcb3..9e61999c4c 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -528,7 +528,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo* pInfo)
HANDLE* list = NULL;
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char* str = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char* str = GetContactProto(hContact);
if (str != NULL && !strcmp(str, m_szModuleName)) {
DBVARIANT dbv;
if ( !JGetStringT(hContact, "jid", &dbv)) {
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 225a4fccc2..1a490f1eb9 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -81,7 +81,7 @@ static INT_PTR JabberMenuChooseService(WPARAM wParam, LPARAM lParam)
static CJabberProto* JabberGetInstanceByHContact(HANDLE hContact)
{
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL)
return NULL;
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index ba6a104413..106c837ef9 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -177,7 +177,7 @@ HANDLE CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL t
// We can't use JabberHContactFromJID() here because of the stripResource option
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto!=NULL && !strcmp(m_szModuleName, szProto)) {
DBVARIANT dbv;
if ( !JGetStringT(hContact, "jid", &dbv)) {
@@ -330,7 +330,7 @@ void CJabberProto::ResolveTransportNicks(const TCHAR *jid)
hContact = (HANDLE)db_find_first();
for (; hContact != NULL; hContact = db_find_next(hContact)) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (lstrcmpA(szProto, m_szModuleName))
continue;
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 4f2dd2060f..cdf57f3f91 100644
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -1065,7 +1065,7 @@ void CJabberProto::_RosterHandleGetRequest(HXML node)
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL)
{
- char* str = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char* str = GetContactProto(hContact);
if (str != NULL && !strcmp(str, m_szModuleName))
{
DBVARIANT dbv;
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index c5754fcd0d..15a10b143b 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -435,7 +435,7 @@ public:
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL)
{
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, m_proto->m_szModuleName))
{
DBVARIANT dbv;
@@ -1372,7 +1372,7 @@ void CJabberDlgPrivacyLists::CListFilter(HWND)
hContact;
hContact = db_find_next(hContact))
{
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if ( !proto || lstrcmpA(proto, m_proto->m_szModuleName))
if (HANDLE hItem = m_clcClist.FindContact(hContact))
m_clcClist.DeleteItem(hItem);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 2a10f808a9..fbb88dde49 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -317,7 +317,7 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, m_szModuleName))
MenuHideSrmmIcon(hContact);
hContact = db_find_next(hContact);
@@ -342,7 +342,7 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
// Set all contacts to offline
HANDLE hContact = db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
SetContactOfflineStatus(hContact);
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp
index 53f5310b28..aeb7ef9bc4 100644
--- a/protocols/JabberG/src/jabber_rc.cpp
+++ b/protocols/JabberG/src/jabber_rc.cpp
@@ -478,7 +478,7 @@ int CJabberProto::RcGetUnreadEventsCount()
int nEventsSent = 0;
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
DBVARIANT dbv;
if ( !JGetStringT(hContact, "jid", &dbv)) {
@@ -575,7 +575,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe
int nEventsSent = 0;
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
DBVARIANT dbv;
if ( !JGetStringT(hContact, "jid", &dbv)) {
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index e4c946a2ad..0604e9c3b1 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -585,7 +585,7 @@ recvRest:
// Set all contacts to offline
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- if ( !lstrcmpA((char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0), m_szModuleName))
+ if ( !lstrcmpA(GetContactProto(hContact), m_szModuleName))
{
SetContactOfflineStatus(hContact);
MenuHideSrmmIcon(hContact);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 1894d79934..681dfbbd3a 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -852,7 +852,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
HANDLE hContact = (HANDLE)lParam;
if (hContact) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
odp.pfnDlgProc = JabberUserInfoDlgProc;
odp.position = -2000000000;
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 8c59d09f6b..3c9dbc4b71 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -76,7 +76,7 @@ HANDLE CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid)
HANDLE hContactMatched = NULL;
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(m_szModuleName, szProto)) {
DBVARIANT dbv;
int result = JGetStringT(hContact, "ChatRoomID", &dbv);
@@ -111,7 +111,7 @@ HANDLE CJabberProto::HContactFromJID(const TCHAR *jid , BOOL bStripResource)
HANDLE hContactMatched = NULL;
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(m_szModuleName, szProto)) {
DBVARIANT dbv;
int result;