Store the listener id in the archiver_db structure
2001-09-28 Bradford Hovinen <hovinen@ximian.com> * bonobo-config-archiver.c (bonobo_config_archiver_new): Store the listener id in the archiver_db structure (bonobo_config_archiver_destroy): Remove the event source listener; destroy the XML cache (new_rollback_cb): Don't reload everything if we initiated the sync ourselves (real_sync): Mark that we are currently up to date
This commit is contained in:
parent
ca6b2c78e6
commit
233eec9cca
3 changed files with 14 additions and 0 deletions
|
@ -221,6 +221,11 @@ real_sync (BonoboConfigDatabase *db,
|
|||
if (!db->writeable)
|
||||
return;
|
||||
|
||||
/* FIXME: This will not work correctly in the pathlogical case that two
|
||||
* ConfigArchiver objects sync at almost exactly the same time.
|
||||
*/
|
||||
|
||||
archiver_db->is_up_to_date = TRUE;
|
||||
location_client_store_xml (archiver_db->location, archiver_db->backend_id,
|
||||
archiver_db->doc, ConfigArchiver_STORE_MASK_PREVIOUS, ev);
|
||||
|
||||
|
@ -704,6 +709,11 @@ new_rollback_cb (BonoboListener *listener,
|
|||
{
|
||||
BonoboArg *arg;
|
||||
|
||||
if (archiver_db->is_up_to_date) {
|
||||
archiver_db->is_up_to_date = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (archiver_db->dir != NULL) {
|
||||
delete_dir_data (archiver_db->dir, TRUE);
|
||||
g_free (archiver_db->dir->name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue