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
|
@ -4,6 +4,9 @@
|
||||||
listener id in the archiver_db structure
|
listener id in the archiver_db structure
|
||||||
(bonobo_config_archiver_destroy): Remove the event source
|
(bonobo_config_archiver_destroy): Remove the event source
|
||||||
listener; destroy the XML cache
|
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
|
||||||
|
|
||||||
2001-09-22 Bradford Hovinen <hovinen@ximian.com>
|
2001-09-22 Bradford Hovinen <hovinen@ximian.com>
|
||||||
|
|
||||||
|
|
|
@ -221,6 +221,11 @@ real_sync (BonoboConfigDatabase *db,
|
||||||
if (!db->writeable)
|
if (!db->writeable)
|
||||||
return;
|
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,
|
location_client_store_xml (archiver_db->location, archiver_db->backend_id,
|
||||||
archiver_db->doc, ConfigArchiver_STORE_MASK_PREVIOUS, ev);
|
archiver_db->doc, ConfigArchiver_STORE_MASK_PREVIOUS, ev);
|
||||||
|
|
||||||
|
@ -704,6 +709,11 @@ new_rollback_cb (BonoboListener *listener,
|
||||||
{
|
{
|
||||||
BonoboArg *arg;
|
BonoboArg *arg;
|
||||||
|
|
||||||
|
if (archiver_db->is_up_to_date) {
|
||||||
|
archiver_db->is_up_to_date = FALSE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (archiver_db->dir != NULL) {
|
if (archiver_db->dir != NULL) {
|
||||||
delete_dir_data (archiver_db->dir, TRUE);
|
delete_dir_data (archiver_db->dir, TRUE);
|
||||||
g_free (archiver_db->dir->name);
|
g_free (archiver_db->dir->name);
|
||||||
|
|
|
@ -67,6 +67,7 @@ struct _BonoboConfigArchiver {
|
||||||
BonoboPropertyBag *pb;
|
BonoboPropertyBag *pb;
|
||||||
|
|
||||||
Bonobo_EventSource_ListenerId listener_id;
|
Bonobo_EventSource_ListenerId listener_id;
|
||||||
|
gboolean is_up_to_date;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue