Changeset 2116

Show
Ignore:
Timestamp:
06/09/07 16:51:45 (1 year ago)
Author:
dgollub
Message:

Fixed problem with getting deleted entries from hashtable.
osync_hashtable_report(sinkenv->hashtable, uid) <- was missing. This
avoids that the hashtable is going to report _everything_ as deleted.

Synchronization of contact entries should be working with 0.30 now :)

event is coming next.

Removed evo2-sync "Name" workaround - this should be fixed in the
vformat converter with some native "workaround". Since evolution has
some trouble if there is no Name (or was it only FormattedName??).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/gnokii-sync/src/gnokii_calendar.c

    r2102 r2116  
    371371                // prepare UID with gnokii-calendar-<memory location> 
    372372                uid = g_strdup_printf ("gnokii-calendar-%i", calnote->location); 
    373                 osync_change_set_uid(change, uid); 
     373                osync_hashtable_report(sinkenv->hashtable, uid); 
    374374 
    375375                // get hash of calnote 
    376376                hash = gnokii_calendar_hash(calnote); 
     377 
    377378                osync_change_set_hash(change, hash);     
     379                osync_change_set_uid(change, uid); 
     380 
    378381 
    379382                // set data 
  • plugins/gnokii-sync/src/gnokii_contact.c

    r2114 r2116  
    422422                        // prepare UID with gnokii-contact-<memory type>-<memory location> 
    423423                        uid = gnokii_contact_uid(contact); 
     424                        osync_hashtable_report(sinkenv->hashtable, uid); 
    424425 
    425426                        hash = gnokii_contact_hash(contact); 
     
    473474        g_free(data); 
    474475 
    475  
    476         /* FIXME: this is really really broken :(  
    477476        int i; 
    478  
    479477        char **uids = osync_hashtable_get_deleted(sinkenv->hashtable); 
    480478        for (i = 0; uids[i]; i++) { 
     
    511509        } 
    512510        g_free(uids); 
    513         */ 
    514511 
    515512        osync_context_report_success(ctx); 
     
    528525        OSyncError *error = NULL; 
    529526        gn_phonebook_entry *contact = NULL; 
     527        char *buf; 
    530528        char *uid = NULL; 
    531529        char *hash = NULL; 
     
    536534 
    537535        // Get changed contact note 
    538         osync_data_get_data(osync_change_get_data(change), &contact, NULL); 
     536        osync_data_get_data(osync_change_get_data(change), &buf, NULL); 
     537        contact = (gn_phonebook_entry *) buf; 
    539538 
    540539        // Check for type of changes 
  • plugins/gnokii-sync/src/gnokii_contact_format.c

    r2114 r2116  
    5959 
    6060                // FIXME: evo2 workaround - evo2 requires a Name / N filed :( 
     61                /* 
    6162                xmlfield = osync_xmlfield_new(xmlformat, "Name", error); 
    6263                osync_xmlfield_set_key_value(xmlfield, "FirstName", contact->name); 
     64                */ 
    6365        } 
    6466