Hello list, first post here.

If you get two copies of this message, apologies in advance.

First, a small patch that changes "Ximan" for "Ximian"...

Now that it looks like I'm helping out, I do have a question. I'm using
multisync (off CVS) to synchronize Evolution 2 (2.0.3) and a Sony
Ericsson T616 mobile phone. When my initial conditions are these:

1. Mobile phone with empty contacts and calendar
2. Evolution without any msync DBs under ~/.evolution

then the (full) synchronization succeeds, printing in the log:

  Synchronization of 2124 entries succeeded.

Sweet! But if I try to synchronize again (even immediately after the
successful synch) I will get the following error:

  Failed to get first plugin changes: Unknown error.

The first plugin is the evo2 connector. From here, nothing I do will
allow me to synchronize again. The only way to achieve that is to go
back to the two initial conditions listed above (that is, clearing up
the phone and evolution changes databases).

Does anybody have any hints? Is there anything I can do to help
tracking this bug? Since I have gone through the pain of compiling
multisync from CVS, I don't mind touching source code.

In fact, after some debugging, I'm starting to form a suspicion about
where the problem lies. Function get_changes() in evolution_sync.c has
the following code (wrapped by me to ease reading):

216     if (env->adressbook &&
            env->commondata.object_types & SYNC_OBJECT_TYPE_PHONEBOOK)
        {
217       if (!e_book_get_changes(env->adressbook,
                                  env->change_id, &changes, NULL))
          {
            sync_set_pair_status(env->handle,
                         "Couldnt get changes from addressbook");
            sync_set_requestfailed(env->handle);
            return;
          }
222       evo_get_changes(&chinfo_list, changes,
                          SYNC_OBJECT_TYPE_PHONEBOOK);
          //e_cal_free_change_list(changes);
          changes = NULL;
        }

227     if (env->calendar &&
            env->commondata.object_types & SYNC_OBJECT_TYPE_CALENDAR)
        {
228       if (!e_cal_get_changes(env->calendar,
                                 env->change_id, &changes, NULL))
          {
229         sync_set_pair_status(env->handle,
                         "Couldnt get changes from calendar");
            sync_set_requestfailed(env->handle);
            return;
          }
          evo_get_changes(&chinfo_list, changes,
                          SYNC_OBJECT_TYPE_CALENDAR);
          //e_cal_free_change_list(changes);
          changes = NULL;
        }

I have selected to sync everything (calendar, tasks and phone book).
The flow goes like this:

216: enter the if for address book
217: will find no outstanding changes (but will NOT fail)
222: set no changes for phone book
227: enter the if for calendar
228: will FAIL when getting outstanding changes
229: will exit the function

Now, evolution 2 is keeping the following change DBs:

calendar: calendar.ics-msyncid2.db
tasks: tasks.ics-msyncid2.db
address book: msyncid2.changes.db

In 217 and 228, it is trying to get changes with an env->change_id
value of "msyncid2"; notice how that matches parts of the names for my
change DBs in evolution. However, you can see the names do not have the
same structure; for both calendar and tasks, the names are

  <FULL DB NAME>-<CHANGE ID NAME>.db

but for address book it is

  <CHANGE ID NAME>.changes.db

I tried synchronizing each thing separately. Tasks and address book
work, only calendar fails. My theory is that this is somehow related to
the name for the calendar change DB in evolution; it is weakened
because I would have expected address book to be the one that fails,
since it is the odd one out. Oh well, this could be an avenue to
explore.

In any case, thanks to everyone for a great piece of software.

Best regards,

-- 
Gonzalo Diethelm
[EMAIL PROTECTED]
Index: plugins/evolution2_sync/src/evolution_sync.c
===================================================================
RCS file: /cvsroot/multisync/multisync/plugins/evolution2_sync/src/evolution_sync.c,v
retrieving revision 1.2.2.11
diff -w -c -r1.2.2.11 evolution_sync.c
*** plugins/evolution2_sync/src/evolution_sync.c	26 Nov 2004 16:06:20 -0000	1.2.2.11
--- plugins/evolution2_sync/src/evolution_sync.c	9 Mar 2005 17:42:23 -0000
***************
*** 403,409 ****
  char *long_name()
  {
    printf ("%s\n", __func__);
!   return "Ximan Evolution 2";
  }
  
  
--- 403,409 ----
  char *long_name()
  {
    printf ("%s\n", __func__);
!   return "Ximian Evolution 2";
  }
  
  

Reply via email to