vcard2address and vcal2todo both call the get_category_id_from_name to get catID (vcard.c:693, 1044), but the relevant DB was not opened before this function is calling.
diff -ur multisync.cvs.org/plugins/palm_sync/src/palm_sync.c multisync.cvs/plugins/palm_sync/src/palm_sync.c --- multisync.cvs.org/plugins/palm_sync/src/palm_sync.c 2004-04-15 23:46:35.000000000 +0800 +++ multisync.cvs/plugins/palm_sync/src/palm_sync.c 2004-08-15 23:18:06.000000000 +0800 @@ -701,18 +701,6 @@ strcpy(database, detectDB(conn, comp)); palm_debug(conn, 2, "Detected vcard to belong to %s", database); - //Convert the vcard to our palm entry - if (!strcmp(database, "AddressDB")) { - vcard2address(conn, &entry, comp); - l = pack_Address(&entry.address, buffer, sizeof(buffer)); - } else if (!strcmp(database, "DatebookDB")) { - vevent2calendar(conn, &entry, comp); - l = pack_Appointment(&entry.appointment, buffer, sizeof(buffer)); - } else { - vcal2todo(conn, &entry, comp); - l = pack_ToDo(&(entry.todo), buffer, sizeof(buffer)); - } - //open the DB ret = openDB(conn, database); if (ret == -2) { @@ -737,6 +725,18 @@ palm_debug(conn, 2, "Created Calendar."); } + //Convert the vcard to our palm entry + if (!strcmp(database, "AddressDB")) { + vcard2address(conn, &entry, comp); + l = pack_Address(&entry.address, buffer, sizeof(buffer)); + } else if (!strcmp(database, "DatebookDB")) { + vevent2calendar(conn, &entry, comp); + l = pack_Appointment(&entry.appointment, buffer, sizeof(buffer)); + } else { + vcal2todo(conn, &entry, comp); + l = pack_ToDo(&(entry.todo), buffer, sizeof(buffer)); + } + if (uid) { int ret = 0; //Modify a entry ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Multisync-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/multisync-devel