diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-10-04 04:10:03 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-10-04 04:10:03 +0000 |
commit | 11b3bc099739ab35d468ef064ebeda756feeeb42 (patch) | |
tree | 47166dcdbacdcac8c13da0ea045d0b920f59d07c /meta2/import.cpp | |
parent | 83ac052dbd269015fa458567db4147091b13a39e (diff) |
fix duplicate subcocntacts when importing (reset metaMap before modules loaded)
fix to binary tree node deletion
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@349 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'meta2/import.cpp')
-rw-r--r-- | meta2/import.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta2/import.cpp b/meta2/import.cpp index 7d3204e..8328584 100644 --- a/meta2/import.cpp +++ b/meta2/import.cpp @@ -271,8 +271,14 @@ void DeleteAllModuleContacts() { hMeta = hContact;
hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hMeta, 0);
- } else
+ } else {
+ // just to be safe
+ DBDeleteContactSetting(hContact, MODULE, "ParentMetaID");
+ DBWriteContactSettingDword(hContact, MODULE, "Handle", 0);
+ DBWriteContactSettingByte(hContact, MODULE, "IsSubcontact", 0);
+
hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
+ }
}
}
@@ -321,6 +327,9 @@ void ImportOldMetas() { }
}
+ // reset ready for modules loaded event
+ metaMap.clear();
+
if(MessageBox(0, TranslateT("Do you wish to remove your old metacontacts from your profile?"), TranslateT("Delete Old MetaContacts"), MB_YESNO) == IDYES)
DeleteOldMetas();
}
|