Dump the log after loading it from the slave (dump_log): Set first_old to
2001-06-20 Bradford Hovinen <hovinen@ximian.com> * config-log.c (slave_data_cb): Dump the log after loading it from the slave (dump_log): Set first_old to the beginning of the list after the dump (do_load): Don't call do_unload (socket_data_cb): Check for hang up first (do_load): Don't call reset_filenames * archive.c, Makefile.am: Replace all instances of ximian-config with ximian-setup-tools * config-log.c (slave_new): Don't apprise slave of new data (config_log_write_entry): Dump log after every write
This commit is contained in:
parent
3f08be4e57
commit
1f701fce3b
3 changed files with 12 additions and 5 deletions
|
@ -5,6 +5,7 @@
|
|||
(dump_log): Set first_old to the beginning of the list after the dump
|
||||
(do_load): Don't call do_unload
|
||||
(socket_data_cb): Check for hang up first
|
||||
(do_load): Don't call reset_filenames
|
||||
|
||||
* archive.c, Makefile.am: Replace all instances of ximian-config
|
||||
with ximian-setup-tools
|
||||
|
|
|
@ -331,6 +331,7 @@ config_log_open (Location *location)
|
|||
"location", location,
|
||||
NULL);
|
||||
|
||||
config_log_reset_filenames (CONFIG_LOG (object));
|
||||
do_load (CONFIG_LOG (object));
|
||||
connect_socket (CONFIG_LOG (object));
|
||||
|
||||
|
@ -635,6 +636,7 @@ config_log_reload (ConfigLog *config_log)
|
|||
g_return_if_fail (IS_CONFIG_LOG (config_log));
|
||||
|
||||
do_unload (config_log, FALSE);
|
||||
config_log_reset_filenames (config_log);
|
||||
do_load (config_log);
|
||||
}
|
||||
|
||||
|
@ -891,17 +893,13 @@ do_load (ConfigLog *config_log)
|
|||
g_return_val_if_fail (config_log->p->location != NULL, FALSE);
|
||||
g_return_val_if_fail (IS_LOCATION (config_log->p->location), FALSE);
|
||||
|
||||
config_log_reset_filenames (config_log);
|
||||
|
||||
fd = open (config_log->p->filename, O_RDONLY);
|
||||
|
||||
if (fd != -1)
|
||||
config_log->p->file_buffer =
|
||||
io_buffer_new (g_io_channel_unix_new (fd), FALSE);
|
||||
else {
|
||||
g_warning ("Could not open config log: %s", g_strerror (errno));
|
||||
else
|
||||
config_log->p->file_buffer = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -525,6 +525,13 @@ location_store (Location *location, gchar *backend_id, FILE *input,
|
|||
|
||||
if (doc_str->len > 0) {
|
||||
doc = xmlParseDoc (doc_str->str);
|
||||
|
||||
if (doc == NULL) {
|
||||
g_warning ("Could not parse XML");
|
||||
g_string_free (doc_str, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
location_store_xml (location, backend_id, doc, store_type);
|
||||
xmlFreeDoc (doc);
|
||||
} else {
|
||||
|
@ -562,6 +569,7 @@ location_store_xml (Location *location, gchar *backend_id, xmlDocPtr xml_doc,
|
|||
g_return_if_fail (IS_LOCATION (location));
|
||||
g_return_if_fail (location->p->config_log != NULL);
|
||||
g_return_if_fail (IS_CONFIG_LOG (location->p->config_log));
|
||||
g_return_if_fail (xml_doc != NULL);
|
||||
|
||||
contain_type = location_contains (location, backend_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue