summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index a85bff5d88..0951d07ace 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -94,7 +94,7 @@ BYTE CExImContactBase::fromDB(MCONTACT hContact)
if (!_hContact) return TRUE;
// Proto
- if (!(pszProto = DB::Contact::Proto(_hContact))) return FALSE;
+ if (!(pszProto = Proto_GetBaseAccountName(_hContact))) return FALSE;
_pszProto = mir_strdup(pszProto);
// AM_BaseProto
@@ -229,21 +229,19 @@ MCONTACT CExImContactBase::toDB()
{
// create new contact if none exists
if (_hContact == INVALID_CONTACT_ID && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
- PROTOACCOUNT* pszAccount = 0;
- if (NULL == (pszAccount = ProtoGetAccount( _pszProto ))) {
+ PROTOACCOUNT *pszAccount = Proto_GetAccount(_pszProto);
+ if (pszAccount == NULL) {
//account does not exist
return _hContact = INVALID_CONTACT_ID;
}
- if (!IsAccountEnabled(pszAccount)) {
- ;
- }
+
// create new contact
_hContact = DB::Contact::Add();
if (!_hContact) {
return _hContact = INVALID_CONTACT_ID;
}
// Add the protocol to the new contact
- if (CallService(MS_PROTO_ADDTOCONTACT, _hContact, (LPARAM)_pszProto)) {
+ if (Proto_AddToContact(_hContact, _pszProto)) {
DB::Contact::Delete(_hContact);
return _hContact = INVALID_CONTACT_ID;
}
@@ -484,7 +482,7 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact)
if (!_pszProto) return hContact == NULL;
// compare protocols
- pszProto = DB::Contact::Proto(hContact);
+ pszProto = Proto_GetBaseAccountName(hContact);
if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || mir_strcmp(pszProto, _pszProto))
return FALSE;