Hi,

The attached patch resolves the problem with not syncing contacts which
included binary data, for example voice commands or pictures. Try it out
and of course backup the phonebook first. Apply with (in multisync
topdir):

% patch -p0 < voice-contact.patch

Technical details:

It was quite hard to find but the problem was caused by this
(irmc_obex.c:get_client_done):

if (ud->databuf && ud->databuflen && *(ud->databuflen) >= body_len) {
    // Copy received data to buffer
    ...
}
...

which is not wrong and should of course be checked. What actually
happened was that a contact containing voice data is (almost everytime)
larger than *(ud->databuflen). 

What I did (as a quick fix) was to remove this line in irmc_sync.c

//objlen = 10240;
if ((ret=irmc_obex_get(conn->obexhandle, filename, objdata, &objlen))<0)
{ ... }

not entirely solving the problem since it would ignore contacts larger
than 65536. The data is BASE64 coded and some warnings occurs with evo2
plugin at least, since it is not handled by evolution.

/Jonas
-- 
Jonas Birmé ([EMAIL PROTECTED])        Jabber: [EMAIL PROTECTED]
http://home.birme.se/~birme/           IRC: [EMAIL PROTECTED]
    |
    +-----< Abandon the search for Truth; settle for a good fantasy >--
--- plugins/irmc_sync/src/irmc_sync.c	2004-04-06 11:47:31.000000000 +0200
+++ ../multisync-cvs/multisync/plugins/irmc_sync/src/irmc_sync.c	2004-11-30 23:26:27.110464968 +0100
@@ -640,7 +640,7 @@
       sync_object_type objtype;      
 
       filename = g_strdup_printf("telecom/pb/luid/%s.vcf", luid);
-      objlen = 10240;
+      //objlen = 10240;
       if ((ret=irmc_obex_get(conn->obexhandle, filename, objdata, &objlen))<0) {
 	objdata[0] = 0;
 	objlen = 0;

Reply via email to