Sync mechanism reworked...



Oy...

Vadim pointed me to some severe blotches in the sync mechanism, regarding
the default_sync_action in a pilots settings (now settable in
gpilotd-control-applet), reg. the settings for a conduit (see cvs version
of memo_file capplet).

Heres the CVS comment I made:

--- 8< ---
Basically heres how syncing works now:

- first manager.c: gpilot_initial_synchronize_operations is
called. This handles get_sysinfo, restore and conduit
requests. The two latter causes synchronization to be stopped
after they're completed.

- then one of the six manager.c: gpilot_synchronize,
gpilot_copy_to_pilot, gpilot_copy_from_pilot,
gpilot_merge_to_pilot, gpilot_merge_from_pilot,
gpilot_sync_default is called. This depends on the
default_sync_action set for the pilot. The first five call the
corresponding method in the conduit, thereby dictating how to
synchronize. The last (sync_default) is used when
default_sync_action is set to "custom", and uses the
synchronization specified in conduitsPILOTID to decide how to
synchronize. This setting therefore lets each conduit have its own
specified way to do the sync.

File installation happens on synchronize, copy_to_pilot,
merge_to_pilot and default.

Hope this clears up the mess.
--- 8< ---

What this means is : You want to choose "Use conduit settings" in the
gpilotd capplet. Then conduits can specify how they want to sync. Eg. the
memo_file conduit can choose Copy From Pilot, but the gnomecal conduit can
use proper synchronization.

If you on the other hand specify "Copy from pilot" in gpilotd capplet, all
conduits will sync using copy_from_pilot, thus it overrules the conduits
settings.

And again :

Synchronize: Record level synchronization both ways, included file
installs.

Copy To Pilot: Pilots db is erased (for that conduit, not all db's), all
local records copied to pilot, files also installed.

Copy From Pilot: local db is erased, all records from pilot are retrieved.
File not installed.

Merge To Pilot: Merges modified&new local records into pilot, files
installed.

Merge From Pilot: Merges modified&new pilot records into local, files not
installed.

Questions/comments ?

/dev/eskil
---



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]