one more fix for 232438 mapping personal address book to Personal category, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@152123 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -382,7 +382,7 @@ DWORD WINAPI DoFastSync(LPVOID lpParameter)
|
||||
retval = sync->m_dbPC->SynchronizePCAB(catIndex, catID, catName,
|
||||
recordCountHH, recordListHH,
|
||||
&recordCountPC, &recordListPC);
|
||||
CONDUIT_LOG1(gFD, "Done syncing AB. retval=%d.\n", retval);
|
||||
CONDUIT_LOG1(gFD, "Done syncing AB. retval=%lx.\n", retval);
|
||||
|
||||
// SynchronizePCAB() returns a list of modified moz records so update those on Palm.
|
||||
if (!retval) {
|
||||
@@ -522,10 +522,12 @@ DWORD WINAPI DoFastSync(LPVOID lpParameter)
|
||||
CONDUIT_LOG1(gFD, " Creating new Palm AB with %d record(s) ... ", recordCountPC);
|
||||
retval = sync->m_dbHH->AddCategory(cat);
|
||||
CONDUIT_LOG2(gFD, "Done creating new Palm AB, new category index=%d. retval=%d.\n", cat.GetIndex(), retval);
|
||||
if(!retval) {
|
||||
if(!retval)
|
||||
{
|
||||
CONDUIT_LOG1(gFD, " Adding %d record(s) to new Palm AB ... ", recordCountPC);
|
||||
newRecIDList = (DWORD *) calloc(recordCountPC, sizeof(DWORD));
|
||||
for (unsigned long i=0; i < recordCountPC; i++) {
|
||||
for (unsigned long i=0; i < recordCountPC; i++)
|
||||
{
|
||||
if(!recordListPC[i])
|
||||
continue;
|
||||
CPalmRecord palmRec = *recordListPC[i];
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
#define kPABDirectory 2 // defined in nsDirPrefs.h
|
||||
#define kMAPIDirectory 3 // defined in nsDirPrefs.h
|
||||
|
||||
#define PERSONAL_ADDRBOOK_URL "moz-abmdbdirectory://abook.mab" // defined in MozABConduitSync.h
|
||||
|
||||
#ifdef DEBUG_bienvenu
|
||||
PRBool PalmDataDisplayed = PR_FALSE;
|
||||
void DisplayTestData(nsABCOMCardStruct * aIPCCard, PRBool IsUnicode)
|
||||
@@ -228,7 +230,11 @@ nsresult nsAbPalmHotSync::GetABInterface()
|
||||
if (description.Length() > 15 && mAbName.Length() <= 15)
|
||||
description.Cut(15, description.Length()-15);
|
||||
|
||||
if(description == mAbName)
|
||||
// check for matching AB+Category, and special case personal address book
|
||||
// to match "Personal" category.
|
||||
if(description == mAbName ||
|
||||
(uri.Equals(PERSONAL_ADDRBOOK_URL, nsCaseInsensitiveCStringComparator())
|
||||
&& mAbName.Equals(NS_LITERAL_STRING("Personal"), nsCaseInsensitiveStringComparator())))
|
||||
break;
|
||||
directory = nsnull;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user