Re: Evo2 <--> IrMC: changed entries not handled well

Armin Bauer <[email protected]>
Newsgroups gmane.comp.gnome.apps.multisync.user
Message-ID <1101820957.5058.10.camel@craal>
On Mon, 2004-11-29 at 23:39 +0100, Jonas Birmé wrote:
> sön 2004-11-28 klockan 15:05 -0600 skrev Arthur Peters:
> > I am using multisync with Evolution 2 and a Sony Ericsson T637 (IrMC).
> > Entries do sync OK. However if I, say, sync then change an enrty on the
> > phone then sync again, I end up with (on Evo) a new entry of the new
> > version of that entry in addition to the old instead of a just a new
> > one. The same seems to accure the other way. I am starting with an empty
> > Evo address book, but a good few entries on the phone.
> > 
> > Also, an entry deleted on one side is not deleted from the other.
> > 
> [snip]
> 
> I found the bug and fixed this problem. Please try the attached patch
> and see if it works for you as well. I recommend doing a backup of the
> phonebook first (for safety).
> 
> Apply the patch by issuing the command:
> (in multisync topdir)
> 
> % patch -p0 < evolution_ebook.c.patch
> 
> Technical details:
> 
> In the function gboolean evo2_addrbook_modify(evo_environment *env, char
> *data, char *uid, char *uidret, int *uidretlen) the following was
> performed:
> 
> uidret = e_contact_get_const (contact, E_CONTACT_UID);
> 
> The parameter uidret is a pointer to data allocated by the syncengine
> and the line above overwrites it, with the result that the uid mapping
> was incorrect. If you look at the ids file you will find that one side
> of the pair is empty.

Ok. The patch looks good and is now in cvs.
I applied a similar patch to etodo.c and ecal.c because they must have
the same bug.

If anyone want to try the evo2 plugin now, you can grab the new cvs
snapshot from
http://www.multisync.org/files/multisync-cvs-snapshot.tar.gz

> 
> Actually another bug is that the caller should specify the size of the
> allocated buffer which uidret points to. However, this modification
> would affect all plugins and I'll rather wait for 0.90 instead.
> 
> /Jonas
-- 
Armin Bauer <[email protected]>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.